the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > in the input 1 1 1 1 1 1 1 1 1, your input is correct, every input a digital press the space key segmentation, When a line is entered, press Enter to indicate that the line is finished. When printing the result, the newline "\n" is missing because you are using the printf function. So it's going to be on the same line. By modifying printf("%d", a[i][j]) to printf("%d", a[i][j]), you can output a space after the number, making the result more clear and easy to read. Also, at the end of each line, you need to add a newline character by placing printf("\n") outside the if statement.
-
When you input a two-dimensional array, press Enter after each line of digits to complete the input. If you do not press Enter, the program will treat all the numbers as the same line of input, resulting in incorrect results.