无语......
查看原帖
无语......
509176
ZHUYIHAN楼主2021/7/31 13:11
#include<cstdio> 
#include<iostream>
using namespace std;
int main()
{
	int n,z=0,s=0;
	cin>>n;
	int x=2*n-2,d=0;
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=n;j++)
		{
			printf("%02d",j+z);
		}
		cout<<endl;
		z+=n;
	}
	cout<<endl;
	for(int i=1;i<=n;i++)
	{
		s++;
		for(int v=0;v<x;v++)
		{
			cout<<" ";
					
		}
		for(int j=1;j<=s;j++)
		{
			d++;

			printf("%02d",d);
			x-=2;
		}
		cout<<endl;
	}
	return 0;
}

空格总是出不来

2021/7/31 13:11
加载中...