#include “stdafx.h”
#include
using namespace std;
int main()
{
int n = 0;
for (int x = 5; x > 0; x–) {
for (int i = 0; i <= x; i++)
{
cout << " ";
}
for (int y = 0; y < 2 * n + 1; y++)
{
cout << “*”;
}
cout << endl;
n += 1;
}
return 0;
}
c++正三角形
最新推荐文章于 2024-03-07 09:40:07 发布