-->
当前位置:首页 > 题库

PROGRAMMING:Table of adding formulas

Luz5年前 (2021-05-10)题库407
Enter a positive integer repeat (0 < repeat < 10) and perform the following operations:
Input a positive integer n (1 ≤ n ≤ 10) and output a table of adding formulas within 20. The addend and the addend are not greater than N, and they are listed in the first row and the first column
A two-dimensional array, and then output the array)
Output format statement:
Plus sign: printf ("% - 4C", '+');
Value: printf ("% - 4D", a [i] [J]), There is no space after the last value of each line to wrap directly
Example: the description is in parentheses, and there is no need to input or output
###Input example:
```in
1 (repeat=1)
3 (n=3)
```
###Output example:
```out
+ 1 2 3
1 2
2 3 4
3 4 5 6
```






answer:If there is no answer, please comment