hello, i just had a very simple question about float, so i am not going to post the full coding, only what matters in this instance.
my output of program shows the computed number as 4, instead of 4.00, even though it is declared as float
Here is the example:
int sum, num1, num2, num3, num4;
sum = num1 + num2 + num3 + num4;
mean = sum / 4.0;
The 4 nums are integers entered by the user in my code and the output shows:
"The mean is 4" when i want it to be the mean is 4.00, or rounded to the nearest 2 decimals.
any ideas what the problem is?