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 899092
Amy Davidson 785623
Jenny Akers 757967
David Lopez 888079
The file shows first and last name of four students in a class. The next 3 numbers
are scores from three different tests that were out of 100. 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
90100 A
8089 B
7079 C
6069 D
059 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 89909290.3 A
Amy Davidson 78562352.3 F
Jenny Akers 75796773.6 C
David Lopez 88807982.3 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 pre-conditions and post-conditions 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!