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