In the if statement, execute the code corresponding to the if statement if the expression in parentheses is true, or in the if statement if false.
However, when we first developed the c language, instead of separating the type that corresponds to true lies, we expressed falsehoods with 0 and 1.
I don't know the exact operating principle, but if the expression in parentheses in the if statement is 0, the conditional statement is judged to be false and does not execute the codes below, and in all other cases, it seems to be true and execute the codes below.
In other words, if the value of num%10 you wrote in the question is 0, the conditional statement (although it is not strictly a conditional statement) is judged to be false, and in all other cases, the if statement is executed.
© 2024 OneMinuteCode. All rights reserved.