Question: C++ Question #2: Write a function named countGrades that will accept a count as the total number of grades to be read in by the

C++

Question #2:

Write a function named "countGrades" that will accept a count as the total number of grades to be read in by the function.

After reading the list of grades, it will return the following statistical data for that list of grades:

- how many grades are passing ('A' or 'B' or 'C')

- how many 'A' grades

- how many invalid grades (not 'A', 'B', 'C', 'D' or 'F')

For example, if the user passes in 1 and enters 'A', it will return 1, 1, 0

If the user passes in 3 and enters 'A', 'B', 'C', it will return 3, 1, 0

If the user enters in 5 and enters 'A', 'B', 'C', 'X', 'A', it will return 4, 2, 1

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!