Here is a summary of the issues to be aware of the brush problem:
1. scanf function return value is the number of variables read out, not read to the data returned -1,eof is a predefined constant, 1;
2. The scanf function reads the data and cannot specify the accuracy. such as: scanf ("%7.2f", &n);
3. The C language does not support defining variables in a for statement. such as: for (int i=0; i<4; i++) is not legal.
Three types of inputs:
1. Variable data: Use while (scanf ("%d", &n)! = EOF);
2. Given the number of data: With scanf ("%d", &n); while (n--) {};
3. End with a value or symbol: With while (scanf ("%d", &n), N).
Three kinds of output:
1. Direct output data and then line;
2. Each group of data followed by a blank line;
3. No two sets of data are followed by a blank line, and the last set of data wraps.
ACM Brush problems need to pay attention to the problem of input and output