Everything runs fine so far. It reads from an option of 2 different files provided by my professor in his compiler containing various numbers. I just don't know how to average them all correctly. I think the "average = (sum / counter);" might be in the wrong spot. Thank you.
1. lines 31 and 32 determine the extent of the loop - keep in mind the sum is a running sum that is continually updated with the next number read in from the file, but there is meant to be only one average.
2. lines 42, 46 and 50 - are you absolutely sure its right to compare the same value from the array to the average?
3. If none of that means much, stay with your program for now and just add a line or two to cout counter, numberArray, sum and average for each pass through the loop you already have.