20分,求解
查看原帖
20分,求解
1110271
SDFZ_SHH楼主2023/10/19 16:30
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int a,b = 0,c = 1,r = 0,n = 4;
	cin >> a;
	for (int q = 1;q <= a;q ++)
	{
		for (int w = 1;w <= a;w ++)
		{
			b ++;
			printf("%02d",b);
		}
		cout << endl;
	}
	cout << endl;
	for (int i = a;i > 0;i --)
	{
		for (int d = 1;d <= c;d ++)
		{
			r ++;
			printf("%4d",r);
			printf("%02d",r);
		}
		cout << endl;
		c ++;
		n --;
	}
	return 0;
}
2023/10/19 16:30
加载中...