+ 2
Why am I getting the values after decimal zero when they are not supposed to be zero??
In this code I have taken the mean as float type, for accuracy of the mean. But still the value of mean is restricted before decimal. https://code.sololearn.com/cPBz8gj15Ank/?ref=app
1 ответ
+ 7
U declared int sum = 0;
Declare sum as float..
Or use typecast mean=(float)sum/5