My program is supposed to read from an input file and output the minimum value, maximum value, the mean (sum of the values divided by the number of values) and the range (max - min +1) of every line. If the value of the first number in every line is less than or equal to zero, the program should terminate.
As minimum starts at 0, the lines only contains 6, so it never triggers another value being lower than that. It works with every other line because the minimum is either 0 or less than 0.
in the for loop, after the file >> number[i] add a quick if
1 2 3 4
if (i == count)
{
int min = number[i], max = number[i];
}