+ 4
Why it print else statement rathar than if ?
float f1 = 0.1; if (f1 == 0.1) printf("Equal"); else printf("Not Equal");
3 Answers
+ 8
Write :
if (f1 == 0.1f)
Then, you're sure the compiler see 0.1 as a float.
In fact, f1=0.1000 and that's different from 0.1, you see ?
+ 2
You're welcome âșïž!
+ 1
Yes it worked. Thanks a lot Sir đ€