Home > Back-end >  C language logic expressions
C language logic expressions

Time:06-09

I and the result is of type int
If (I/result==1) and the if (I==the result) is there a difference

CodePudding user response:

reference Pt. The building Lord reply:
I and the result is of type int
If (I/result==1) and the if (I==result) is there any difference between
123/100 as is 1 you said

CodePudding user response:

Because I and reuslt is int, I/result==1, not necessarily because of two equal, such as 1.5 (3/2) theory, but int/int only get int, so l=1, so the above two logical expressions ranging oh

CodePudding user response:

reference 1st floor lin5161678 response:
Quote: refer to the original poster Pt. Response:

I and the result is of type int
If (I/result==1) and the if (I==result) is there any difference between
123/100 as is you say 1

Thank you very much want to half a day did not want to understand haha

CodePudding user response:

refer to the second floor Italink response:
because I and reuslt is int, I/result==1, not necessarily because of two equal, such as 1.5 (3/2) theory, but int/int only get int, so l=1, so the above two logical expressions ranging oh

Thank you for what you said is very clear

CodePudding user response:

Add and divisor of 0

CodePudding user response:

Logical expression and any other statements, should be based on the function of the need to write directly, try not to change, or don't understand others and yourself

CodePudding user response:


I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related