9
2025-09-26 17:43:02
发布于:浙江
4阅读
0回复
0点赞
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int n;
cin >> n;
for (int i = 0; i < n; i++)
{
int t=1;
for (int j = 0; j < n; j++)
{
if (i<=j)
{
cout<<setw(5)<<t;
t++;
}
else cout <<" ";
}
cout << endl;
}
return 0;
}
这里空空如也
有帮助,赞一个