+ 1
Why the answer is 814 and not 815?
2 Answers
+ 4
If you print z, you'll see it stores 889 and not 890.
I'm guessing it has something to do with the tricky nature of floats. Try using the round function (defined in <math.h> header file):
z = round(y * 100);
0
Thanks for your help