0
How does 1.5 < (7/4) equal 0? I dont understand
It was in a coding challenge in C++
2 Respostas
+ 3
would be helpful to post the whole code im assuming its integer math so its basically 1.5 < 1 which is false which has a Boolean value of 0.
+ 1
Yes, integer/integer gives integer result unless you typecast at least one of the operands to float, or explicitely work with float variables.