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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started