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 13, from 0-15 points...




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 13, 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 rain function of your program must contain the statement average = curve(grades, N, letter); where N is an int with the tot id number of grades entered, letter is a 4 clement array of integers, and average is a float. The function curve will compute the average of the entered grades, giving this average as its output, and will also compute the total number of grades at each grade level, using the first element of letter to store the number of 'A' grades in the grades array, the second element of letter for the number of '13' grades, etc. After using the curve function as above, rain should then print the class average, and the number of grades in each category to the screen (note that this output should not be done inside the curve function!). Your program must of course include a proper definition and prototype of the curve function along with the code in rain. A sample run of your program should look like: Enter number of grades: 8 Enter each grade, separated by a space: 20 35 40 50 60 75 80 90 Class average is 56.25 There are 3 As, 1 Bs, 1 Cs, and 3 Ds.
Nov 11, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here