Ab #include using namespace std; int main() { int n; cout<>n; for(int i=1;i<=n;i++) { for(int k=1;k<=n-i;k++) { cout<<" "; } for(int k=1;k<=i;k++) { cout<<"*"; } cout<<endl; } Log in to Reply
#include
using namespace std;
int main()
{
int n;
cout<>n;
for(int i=1;i<=n;i++)
{
for(int k=1;k<=n-i;k++)
{
cout<<" ";
}
for(int k=1;k<=i;k++)
{
cout<<"*";
}
cout<<endl;
}