I have this program which I have to do. I am stuck because I haven't been programming in a while, therefore I forgot a couple of things. If anyone would be able to help me with anything and get me started with this program, I would be very grateful.
Here it is:
This Program should calculate weighted averages of grades. The program should also help answer this question: “how much to I have to get on the final in order to get an (x)?”
The program should open with heading on the screen which asks the user how many tests will be given during a semester. Then, the program should this number, n, and an empty integer array, percentages, to a void function. The void function should fill percentages by asking the user what percent of the grade is each test. The sum of all the percentages must be 100. If it is not there should be error message which should make the user reenter the information.
Once the percentages array is full, you should give the user one of two options. (Each of these options should be done by done by a separate function)
1) Allow the user to enter the n test grades and calculate the weighted averages of the grades.
2)Allow the user to enter in n-1 grades. First ask the user which test grade, k, the user is not entering (note 1<=k<=n.) Then enter in all but the k-th grade (hint: use continue in a for loop). Ask the user what he would like to get above as an average. Call this double variable above. Then calculate and print what the student needs to get in the k-th test to earn a grade higher then above. Now simply solve for x.)
Once this is done, allow the user to enter in the information for another student, or an option to stop.
Any help is greatly appreciated.