#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";
}
}
3 comments:
how do i start programing in java?
👍🏻
Post a Comment