#924. [基础]循环练习III
[基础]循环练习III
No submission language available for this problem.
Background
Special for beginners, ^_^
Description
输入一个正整数 n (n < 100),输出 1 ~ n,要求每 5 个换一行,输出的每个整数要求占 2 个符号位置。
提示
对于 printf 的输出格式(部分)
- 输出一段字符串:
printf("这是一段文字"); - 输出
int a = 1的数值:printf("%d", i); - 输出
int a = 1占 2 字符位的数值:printf("%2d", i); - 输出
double a = 1.1的数值:printf("%f", a); - 输出
double pi = 3.1415926保留 2 位小数的数值:printf("%.2f", pi);
Format
Input
一行一个整数 n
Output
1~n 的若干行数字,每行最多 5 个整数,每个整数占 2 个字符位,且两个相邻的整数之间还要有一个空格隔开。
Samples
12
1 2 3 4 5
6 7 8 9 10
11 12
17
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17
Limitation
1s, 1024KiB for each test case.
Related
In following homework: