#include void main () { int n; cout << "请输入层数: " ; cin >> n; for (int i=0; i { for (int j=0; j { cout << " "; } for (int k=0; k<2*i+1; k++) { cout << "*"; } cout << endl; }}