#include<conio.h>
void main()
{
clrscr();
intm,n,i,j,k;
cout<<"enter the integer\n";
cin>>n;
for(i=0;i<=n;i++)
{
for(j=0;j<=n-i;j++)
cout<<" ";
for(k=i;k>=0;k--)
cout<<"*";
for(m=1;m<=i;m++)
cout<<"*";
cout<<"\n";
}
getch();
}
OUTPUT
enter the integer
5
*
***
*****
*******
*********
***********
Comments :
Post a Comment