#include<bits/stdc++.h> using namespace std; int main(){ int n,i,j,w; cin >> n; w= (n + 1) / 2; for( i = 1; i <=w; i++) { for( j = 1; j < i; j++) { cout << " "; } for(int j = 1; j <= n; j++) { cout << "*"; } cout << endl; } for( i = w - 1; i >= 1; i--) { for(int j = 1; j < i; j++) { cout << " "; } for(int j = 1; j <= n; j++) { cout << "*"; } cout << endl; } return 0; } /************************************************************** Problem: 1219 User: cyp Language: C++ Result: Accepted Time:8 ms Memory:2072 kb ****************************************************************/