Home > Back-end >  Why can't perform the else, even if the input the else control conditions, after will also perf
Why can't perform the else, even if the input the else control conditions, after will also perf

Time:04-01

CodePudding user response:

The scanf (" % d, & amp; N "); Instead the scanf (" % d ", & amp; N);
The scanf (" % d ", b); Instead the scanf (" % d ", & amp; b);

The inside of the printf % and variable of one to one correspondence relation
The scanf % and variables and the variables inside before add don't add & amp; One-to-one correspondence relationship
Is the place that C code is very easy to get wrong, and generally don't compile error,
So during the compilation of source code is worth specially carefully check it again and even many times before,


CodePudding user response:

Determine the==operator,

CodePudding user response:

Suggest to check the building Lord while, if the conditions, conditions are=assignment statement, is not a statement,

The second parameter is the scanf (variable) address, rather than a variable's value,

CodePudding user response:

reference 1/f, zhao teacher reply:
the scanf (" % d, & amp; N "); Instead the scanf (" % d ", & amp; N);
The scanf (" % d ", b); Instead the scanf (" % d ", & amp; b);

The inside of the printf % and variable of one to one correspondence relation
The scanf % and variables and the variables inside before add don't add & amp; One-to-one correspondence relationship
Is the place that C code is very easy to get wrong, and generally don't compile error,
So during the compilation of source code is worth specially carefully check it again and even many times before,

Thank you big! Thank you thank you
  • Related