pattern



#include
#include

void display(int);
void main()
{
int n;
clrscr();
cout<<"Enter The NO:"; cin>>n;
display(n);
getch();
}
void display(int n)
{
for(int i=1;i<=n;i++) { for(int j=n;j>=i;j--){
cout<<" ";
}
for(int k=1;k<=i;k++){
cout<<" *";
}
cout<<"\n";
}
}

0 comments:

Post a Comment