#include <iostream> #include <cstring> using namespace std; int main(){ int i,j,n,t; cin>>n; t = n / 2 + 1; for(i = 1;i <= t;i++){ for(j = 1;j <= i - 1;j++){ cout<<" "; } for(j = 1;j <= n;j++){ cout<<"*"; } cout<<endl; } for(i = t - 1;i >= 1;i--){ for(j = 1;j <= i - 1;j++){ cout<<" "; } for(j = 1;j <= n;j++){ cout<<"*"; } cout<<endl; } } /************************************************************** Problem: 1219 User: admin Language: C++ Result: Accepted Time:10 ms Memory:2072 kb ****************************************************************/