Home /
Expert Answers /
Computer Science /
do-you-know-why-my-code-is-wrong-its-just-producing-0s-as-my-answers-a-professor-will-assign-grade-pa433
(Solved): do you know why my code is wrong? its just producing 0s as my answers. A professor will assign grade ...
do you know why my code is wrong? its just producing 0s as my answers.
A professor will assign grades to his class as follows: any score more than 15 points above average will receive an A, from 0?15 points (inclusive) above average will receive a B, from 0-15 points below average will receive a C, and more than 15 points below average will receive a D. Write a C++ program which will ask the user how many students in the class, then allow them to enter the exam grades for each from the keyboard. The exam grades should be stored in a float array called grades. The main function of your program must have the statement average = curve ( grades, N,nA,nB,nC,nD) where N is the total number of grades entered. That is, main must call a function called curve which will compute the average of the entered grades, as well as the total number (nA) of 'A' grades given using the above curve strategy, the total number hB ) of B grades, etc. The main function should then print the class average, and the number of grades in each category to the screen. Your program must include a proper definition and prototype of the curve function used by main. A sample run of your program should look like: Enter number of grades: 8 Enter each grade, separated by a space: 2035405060758090 Class average is 56.25