So this is my assignment, Create a 1-D Array to hold a set of exam scores:
55 74 93 84 64 72 69 78 87 84 72 33 83 68 62 51 88 90
Write a program to do the following tasks:
1. Display scores in rows of four(4) scores.
2. Calculate average score and display.
3. Find Lowest score and display.
4. Find Highest score and display.
5. Find the deviation of each score, and
display the score and its deviation.
6. Find the Standard Deviation and Display
7. How many scores are within One Standard Deviation
So I have the average down, but I am getting stuck at the part of displaying the highest and lowest score. Every time I run the program I get two giant negative numbers for both of them. Was hopping someone could look at my coding and see where I went wrong. Oh and I put all the scores into a .txt file and I just opened in through the program. Thanks.
I'd say its because you're never actually comparing the exam scores in the text file but instead garbage stored in numbers when you declare it. You're going to have to open the file first, store all the numbers in the numbers array, and then find the highest, lowest, and average.