NBA - Boston Celtics

Friday 14 December 2012

Pyramid


#include<iostream.h>
#include<conio.h>
void main()
{
int j=10;

for (int i=1;i<=10;i++)
{
for (int k=1;k<=j;k++)
{
cout<<" ";
}
for (int x=1;x<=i;x++)
{
cout<<"*";
cout<<" ";

}
cout<<"\n";
j--;
}
getch();
}

No comments:

Post a Comment