Why this happens?
When I add floats and get the sum of them, the result is inaccurate. https://code.sololearn.com/cz0swy0QVg0X/?ref=app
What output did you expect actually?
As I understand it, floating point calculation accuracy is a tricky problem, maybe someone can explain about that better. Although this may not be a definite solution (nor even work), you can try to use double in place of float.
B.virus Write this after for loop, if you mean to truncate after 72.87000 printf("%.5f\n",sum);
U can take double in place of float
I writed printf outside the loop, and the result is 72.87003.
72.87000 is what I expect