文章
19
粉丝
0
获赞
4
访问
11.3k
#include<bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
for (int row = 1; row <= n; row++) {
for (int col = 1; col <= n - row; col++) {
cout << " ";
}
for (int num = 0; num < 2 * row - 1; num++) {
cout << "*";
}
cout << endl;
}
for (int row = n-1; row >= 1; row--) {
for (int col = 1; col <= n - row; col++) {
cout << " ";
}
&...
登录后发布评论
暂无评论,来抢沙发