1057: 数字走向II
Time Limit: 1 Sec Memory Limit: 128 MBDescription
输入整数N,输出相应方阵。
Input
一个整数N。( 0 < n < 10 )
Output
一个方阵,每个数字的场宽为3。
Sample Input
5
Sample Output
21 22 23 24 25
16 17 18 19 20
11 12 13 14 15
6 7 8 9 10
1 2 3 4 5
HINT
Source
#include<stdio.h>
main()
{
int N;
scanf("%d",&N);
for(int i=N;i>=1;i--)
{
for(int j=N*i-N+1;j<=N*i;j++)
{
printf("%3d",j);
}
printf("\n");
}
}