第一题、
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
for(int l=1;l<n+1;l++)
{
for(int k=0;k<n-l;k++)
{
cout<<" ";
}
for(int h=0;h<2*l-1;h++)
{
cout<<l;
}
cout<<endl;
}
system("pause");
return 0;
}
第二题、
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
for(int l=1;l<n+1;l++)
{
for(int k=0;k<