current position:Home>C language: input several integers (the number should be less than 50) from the keyboard, and their values are in the range of 0 ~ 4. When the input number is - 1, the input ends. After that, the values of each cell of the array are output, and each numbe

C language: input several integers (the number should be less than 50) from the keyboard, and their values are in the range of 0 ~ 4. When the input number is - 1, the input ends. After that, the values of each cell of the array are output, and each numbe

2022-01-27 04:02:00 CSDN Q & A

Enter several integers from the keyboard ( The number should be less than 50 individual ), Its value is 0~4 Within the scope of , When the number entered is -1 When the input is over , After that, output the value of each cell of the array , Each number is required to account for 5 The width of characters .




Refer to the answer 1:

Define a 50 An array of lengths , Loop to accept input , Judgment for -1 End , Count the number of input figures . Then recycle all the elements of the output array




Refer to the answer 2:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/01/202201270401559277.html

Random recommended