#include
using namespace std;
int main(){
int n;
cout<<"Enter rows n: ";
cin>>n;
for(int i=0;i<=n;i++){
for(int j=0;j<=i;j++){
cout<<"*";
}
for(int k=0;k<(2*n-2*i-1);k++){
cout<<" ";
}
for(int l = i; l>=0;l--){
if(l==n){
continue;
}
cout<<"*";
}
cout<<"\n";
}
return 0;
}
Comments
Post a Comment