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
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