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

PROGRAMMING:Output a square matrix of order n

Luz5年前 (2021-05-10)题库382
Read in a positive integer n (3 ≤ n < 9) and an integer digit (2 < = digit < = 9), please output a square matrix of order n, the elements on all sides of the matrix are digit, other elements are digit-1
###Input format:
Enter N and digt on one line
###Output format:
Output n-order square matrix
###Input example:
Here is a set of inputs. For example:
```in
4 2
```
###Output example:
The corresponding output is given here. For example:
```out
2 2 2 2
2 1 1 2
2 1 1 2
2 2 2 2
```







answer:If there is no answer, please comment