I'm writing a program where a user keeps entering numbers until "0" is entered.
Once "0" is entered the loop ends and It displays the mean. Problem is it counts the "0" in the average.
e,g:
Enter number 1: 5
Enter number 2: 2
Enter number 3: 3
Enter number 4: 0
The mean is 2.5.
But I want it to only count everything before the "0".
(5 + 2 + 3) / 3 = 3.333333