Question: In C + + create an input file called indata.txt that has the following data: David Smith 8 9 9 0 9 2 Amy Davidson
In C create an input file called indata.txt that has the following data:
David Smith
Amy Davidson
Jenny Akers
David Lopez
The file shows first and last name of four students in a class. The next numbers
are scores from three different tests that were out of You need to find the
average of these three scores and then use the average to find the grade for the
student based on this table.
Average Score Grade
A
B
C
D
F
You should write the information read from the input file to an output file called
grades.txt You may also write data to the screen.
In addition, add average score then followed by the grade.
Hence, for the input file given above, the output file should be like this.
David Smith A
Amy Davidson F
Jenny Akers C
David Lopez B
Use functions in your program if you can. Otherwise, it will be fine in this program
to find the solution without using any functions.
Add preconditions and postconditions documentation to your function.
You may use same test values shown above.
Remember to use meaningful names for your variables.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
