Calculating the average, high, and low for each quiz and display them
I am having trouble writing a code that always a person to enter 5 grades for 5 students. I am using arrays to do this, but I cannot calculate the average out right and getting the high and low numbers to display across the screen. I would like to get some tips thanks!
A good tip:
Show us the code...
Well, think about it logically. If you've got an array, say grades, what do you know about C and arrays that will make walking it a little easier? (Think pointers!) As for calculating the high and low, can you sort the array so you know that, for example, grades is the lowest and grades is the highest? Or maybe keep track of it with other variables as you walk through the array to add up the grades so you can calculate the average? - I'm just trying to give you a couple ideas to get your brain working, but there's an amazing number of ways to do what you want to do. Try it and see what happens, and if it doesn't work, try it a different way.
Also: if it helps, write down the steps on a piece of paper and go from there.