20th Oct 2020, 9:17 PM
Kostas
Kostas - avatar
2 ответов
+ 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);
20th Oct 2020, 9:32 PM
Zerokles
Zerokles - avatar
0
Thanks for your help
21st Oct 2020, 8:28 AM
Kostas
Kostas - avatar