- 龙凤苑中学A班5.31
数字三角形
- @ 2024-5-31 17:23:06
#include <bits/stdc++.h>
using namespace std;
int main() {
int n,k=1;
cin>>n;
for(int i=n;i>=0;i--)
{
for(int j=1;j<=i;j++)
{
if(k<10)
{
cout<<"0"<<k;
}
else
{
cout<<k;
}
k++;
}
cout<<endl;
}
return 0;
}
0 comments
No comments so far...