CodePudding user response:
The scanf judgment by Spaces input endKnow number of data words most directly define a bigger array, or dynamic memory allocation, mallloc colloc, realloc ~ ~ ~
CodePudding user response:
But now I don't know the specific several inputs, so might need a sign like \ n judgment over, but there is a space before \ n it's very troublesomeCodePudding user response:
\ n end judgment is not available, or you can make a line, knock again carriage returns, and apparently circulation receives input, getchar also cannot useCodePudding user response:
What other methodsCodePudding user response:
You are doing the topicQuestions tend to give input when a certain number of input end of the
If you would like to make something else ~ ~ temporarily can't think of any good idea, not familiar with c language input function, may be can let what you typed in something and not the input is removed from the buffer function of other language is c is not clear, so can detect \ n will not give you input Numbers to eat again
CodePudding user response:
Of course there is also a bad idea, take to receive as a string, and then points out that the figures is straightforwardCodePudding user response:
The 10 have to judgeCodePudding user response:
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.htmlI hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html