Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write a program that reads a student\'s name together with hisor her test scores

ID: 3613951 • Letter: W

Question

write a program that reads a student's name together with hisor her test scores. The program schould then compute theaverage test score for each student and assign the appropriategrade. The grade scale is as follows 90-100, A; 80-89, B;70-79, C; 60-69, D; F, your program must use the followingfunctions; (a) A void function, calculateAverage, to determine theaverage of the five test scores for each students. Use a loopto read and sum the five test scores. (This functions doesnot output the average test score. That task must be done inthe function main) (b) A value-returning, calculateGrage, to determine and returneach student's grade.(This function does not output the grade thattask must be done in the function main) Test your program on the data. Read the data from a fileand send the output to a file. Do not use any globalvariables. Use the appripriate parameters to pass in and out offunctions. write a program that reads a student's name together with hisor her test scores. The program schould then compute theaverage test score for each student and assign the appropriategrade. The grade scale is as follows 90-100, A; 80-89, B;70-79, C; 60-69, D; F, your program must use the followingfunctions; (a) A void function, calculateAverage, to determine theaverage of the five test scores for each students. Use a loopto read and sum the five test scores. (This functions doesnot output the average test score. That task must be done inthe function main) (b) A value-returning, calculateGrage, to determine and returneach student's grade.(This function does not output the grade thattask must be done in the function main) Test your program on the data. Read the data from a fileand send the output to a file. Do not use any globalvariables. Use the appripriate parameters to pass in and out offunctions.

Explanation / Answer

please rate - thanks #include #include #include using namespace std; void calculateAverage(double&, ifstream&); char calculateGrade(double); int main() { string name; double average; char grade; ifstream in; ofstream out; in.open("input.txt");          //open file if(in.fail())            //is it ok?    { cout