#include 《iostream》
using namespace std;
int main() {
int n;
char a = '*';
cin >> n;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= n + i; j++) {
cout << " ";
}
for (int f = 1; f <= i; f++) cout << a << " ";
cout << "\n";
}
return 0;
}
共 1 条回复
前空格打的不对 *之间不能加空格