Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started