0

Is this condition right? Whether 0>0 is true

int I=0 while (I>0) {}

15th Aug 2017, 6:10 PM
corejava
4 odpowiedzi
+ 10
I'm pretty sure zero is not larger than zero, so 0>0 is false.
16th Aug 2017, 3:45 AM
Hatsy Rei
Hatsy Rei - avatar
+ 2
say you have zero cookies, and so does your friend. do you have more cookies? 😄💟🍪 cout << "🍪"
16th Aug 2017, 3:57 AM
HJ🐓TDM
+ 1
0 > 0 is not true, it's false. So, the code in the while block will not be executed.
15th Aug 2017, 6:23 PM
Boris Batinkov
Boris Batinkov - avatar
+ 1
It is false.
16th Aug 2017, 9:38 AM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar