tijie
2024-07-14 14:39:07
发布于:广东
4阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main(){
int a;
cin >> a;
for(int i = 1;i <= a; i++){
for(int j = 1;j <= a - i; j++){
cout << " ";
}
for (int j=1;j <= i * 2 - 1; j++){
cout << "*";
}
for (int j = 1; j <= a - i; j++){
cout << " ";
}
cout << endl;
}
return 0;
}
这里空空如也
有帮助,赞一个