Yesterday made it through the ACM primary school, and then looked at the topic today, found that some problem of multiple sets of data input is input, but there is no clear several groups, and then I was thinking about using a while loop to control the input the number of groups, but what to write in the () at the back of the while I was a bit overwhelmed, define a variable, but value and don't know, and then to the scanf there seems to be a return value, when the right time is like returns the number of input data, otherwise it returns EOF, learned c language should know EOF is 1, then I'll take a while (the scanf (" % d ", & amp; Data)!=(EOF) to the end, interested can have a try,
CodePudding user response:
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html