This program is supposed to end when the user enters 0 and then show the count, sum, average, min and max. I am able to figure out the sum count and average but my min and max i
You used:
if (number > 0) { count = count + 1; sum += number; min = number; max = number; }
Here, don't use:
min = number; max = number;
Because, when number is greater than 0, min and max value will be set to the input number so the if and else if statement below it, will not work.