#include <iostream.h>
#include <conio.h>
int main ()
{
int row, pound, star;
int nrows = 6;
for(row = 1; row <= nrows; row++)
{
for(pound = 1; pound <= nrow-row; pound++)
cout<<"#";
for(star =1; star <= 2*row-1; star++){
if(star == 1 || star == 2*row-1)
cout<<"*";
else
cout<<"#";
for(pound = 1; pound <= nrow-row; pound++)
cout<<"#";
cout<<endl;
}
}
getch();
}
No comments:
Post a Comment
If you have any doubt please let me know