0
How does this give 2 as an output?
6 Respostas
+ 6
😉 Krishna 🤘 right but there is something else that the asker may not know: true>a is equivalent to 1>a, so if 'a' was a negative number (or 0) it would actually print 1.
True and False when compared to numbers take values 1 and 0 respectively.
+ 3
I think that
if(c>b>a)
Is not a valid input, you can change the input maybe to
if(c>b && b>a)
That "&&" means "and", so that input will be
"if c bigger than b AND b bigger than a"
+ 1
Aymane Boukrouh yeah later I had tried with 0 and it showed 1.
0
Jingga Sona this was a question in a 'play' match