Question: In C + + Write a program that: Asks the user to supply their most recent grade this semester Reads the first row of MyGrades.txt

In C++
Write a program that:
Asks the user to supply their most recent grade this semester
Reads the first row of MyGrades.txt using the file input/output stream. (this will get the last previous grade that was recorded)
Prints a report that shows the recent grade and last recorded grades followed by the average of the two grades.
To be clear - last semester's most recent grade is stored in the 1st line of the file, do not read the other lines in the file. The user should input the course name, some white space, and the grade (the same format as the name and grade in the MyGrades.txt). The course name must be one word and the grade can be a decimal number.
Format your report, using I/O manipulators so that the course name is left justified, the grade is right justified, and is accurate to one decimal place.
Example output and input:
What is the most recent grade you received this semester?
Please enter the course name and your grade (Example: Astronomy 95)> C++99.93
Your last two grades this semester:
----------------------------------
C++99.9
Biology 87.0
----------------------------------
The average of those two grades is: 93.5

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 Finance Questions!