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

write a program to compute numeric grades for a course. The course records are i

ID: 3617243 • Letter: W

Question

write a program to compute numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's last name, then on espace, then the student's first name, then one space, then ten quiz scores all on one line. The quiz scores are whole numbers and are separated by one space. Your program will take its input from this file and send its output to a second file. The data in the output file will be the same as the data in the input file except that there will be one additional number ( of type double ) at the end of each line. This number will be the average of the student's ten quiz scores. If this is being done as a class assignment, obtain the file names from your instructor. Use at least one function that has file streams as all or some of its arguments. Input file content: test_ line_ 10 20 30 40 50 60 70 80 90 100 Price Betty 40 50 60 70 60 50 40 30 60 90 Goodman James 60 70 80 90 50 60 90 90 100 90 Smith Charles 70 80 90 60 70 60 80 90 90 90 Jones Warren 70 70 80 90 70 80 90 80 70 60

Explanation / Answer

please rate - thanks #include #include using namespace std; void calculate(ifstream&, ofstream&); int main() { ifstream in; ofstream out; in.open("input.txt");          //open file if(in.fail())            //is it ok?    { coutfirst; while(in)    {sum=0;    in>>last;    for(i=0;i>a[i];       sum+=a[i];       }    out