+ 6
Are Float and int values are equal?
Float y=3.0 and Int x=3 are equal or not? in c++ eual then how?
7 Answers
+ 5
Should be able to compare with the == operator. Quick google search shows the int is converted to floating point, meaning that the numbers may not be perfectly equal when comparing them, but typically are.
+ 4
You can test it using ==
+ 3
already deleted it was a mistake
+ 2
No it's not in c++
+ 2
one can say thats equal but not equal by general due to floating decimal values also in casting problems they are different
0
Thanks all for valuable answers š