#include <iostream>
using namespace std;
int main()
{
int i, j, k, m, n = 12;
i = 1;
while (i <= n + 1)
{
cout <<' ';
i++;
}
cout <<'*' <<endl;
i = 1;
while (i <= n)
{
j = 1;
while (j <= n - i + 1)
{
cout <<' ';
j++;
}
cout <<'*';
k = 1;
while (k <= 2 * i - 1)
{
cout <<' ';
k++;
}
cout <<'*' <<endl;
i++;
}
m = 1;
while (m <= 2 * i + 1)
{
cout <<'*';
m++;
}
cout <<endl;
return 0;
}空三角
最新推荐文章于 2024-01-24 06:30:00 发布
1024

被折叠的 条评论
为什么被折叠?



