While (the scanf (" % d ", & amp; A)==1) why I can't input end after the enter key? (a type is an int) Submitted to the oj platform and the results The compiler input characters to display the results
CodePudding user response:
A carriage return is the content of the input buffer to brush into memory, if there is no content in the input buffer, so how to brush to memory?
CodePudding user response:
#include #include using namespace std; Long long a, s, I, w; Int main () { While (the scanf (" % d ", & amp; A)==1) { S +=a; i++; } W=1; for(int j=1; JW *=2; cout return 0; }