Question: getGrades(float scores, string grades, int size) --- convert from score to letter grade for each score. TODO Write a function getGrades that converts an array

getGrades(float scores, string grades, int size) --- convert from score to letter grade for each score. TODO

Write a function getGrades that converts an array of floats representing students' grades into strings representing their letter grades. The function does not return a value, but should fill in the grades array.

The function should take the following parameters:

an array of floats scores with entries in the range [0, 100]

an array of strings grades in which the associated grade is returned.

an integer representing the size of the array size

Use the grading criteria for this class. Assume for this exercise that ranges are inclusive on the lower end. e.g., A is [93, 100] , A- is [90, 93), B+ is [87, 90), B is [83, 87),..., less than 60 is an F. If the following array is provided to the function:

 float scores[] = {92.8, 87, 74, 94.5}; the function should return the following values in grades: { "A-", "B+", "C", "A"} 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!