#include “stdafx.h”
#include
using namespace std;
int main()
{
int n = 5;
for (int x = 0; x < 5; 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++倒三角形
最新推荐文章于 2023-01-09 09:01:20 发布