Question: Write a C++ program that repeatedly inputs students scores and determines the letter grades. The scores should be stored in a file called scores txt
Write a C++ program that repeatedly inputs students scores and determines the letter grades. The scores should be stored in a file called "scores txt" For each score, output the score along with its letter grade. Your program should count the number of A's, B's, etc. Use five counters (a_count, b_count, etc). See main program below. The letter grade is determined based on the following scale: > = 90 (A), > = 80 (B), > = 70(C), > = 60(D), > = 0(F). Output all frequencies. Your program must, at least, include the following functions: A function (get_grade) that takes a score as a parameter and returns a letter grade. A void function to print the score and the grade Void print-grade (double score, char grade): A void function to print the frequencies. Void print frequencies (int a_count, int b_count, int c_count, int d_count, intmf_count): Main Program: int main() { double score: int a_count = 0, b_count = 0, c_count = 0, d_count = 0, f_coun t = 0;/open the file for input//get the first score while (not end of file) char grade = get grade (score);//output the score the grade (determine which counter is updated
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
