#include<iostream>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int k = n - i - 1;
for (int i = 0; i < k; i++)cout << " ";
int x = i * 2 + 1;
for (int i = 0; i < x; i++)cout << "*";
for (int i = 0; i < k; i++)cout << " ";
cout << "\n";
}
return 0;
}
1031. 等腰三角形 (Standard IO)
最新推荐文章于 2024-11-18 18:38:00 发布