Write a program that will input 7 letter grades (A, B, C, D, F). The grades will
ID: 3649408 • Letter: W
Question
Write a program that will input 7 letter grades (A, B, C, D, F). Thegrades will be read(user input) into an array. A function will be called 5 times (once
for each letter grade) and will return the total number of grades in that
category. The input to the function will include the array and the letter category (A, B, C, D or F). The program
will print the number of grades that are A, B, etc.
Declare the size of the array as a global constant.
Sample Run:
All grades must be upper case A B C D or F
Input a grade
A
Input a grade
C
Input a grade
A
Input a grade
B
Input a grade
B
Input a grade
D
Number of A=2
Number of B=2
Number of C=1
Number of D=1
Number of F=0
I just don't know where to start. I can print and ask for input for grades and save it, but calling another function and writing a code that knows how many of each letter there are is just confusing me.
Explanation / Answer
#include #include using namespace std; void grades(char arr1[],int n) { for (int i=0;iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.