Home > Back-end >  About the location of the space of input in the scanf function
About the location of the space of input in the scanf function

Time:09-27

Like I this code, the second the scanf Spaces in the after % d and in % d before the result is different
For help, thank you very much,



Spaces in the

The result is such, need three line of the input






And space in the former, it only need to input two lines


CodePudding user response:

The scanf format control string of Spaces mean
Into matching blank character mode until encounters non-white-space characters exit matching
Used to skip any more white space characters (including zero)

CodePudding user response:

The second the scanf don't need space,
  • Related