Question: C++ Write a program that reads data from a text file and assigns the vales to a two - dimensional array The text file contains

 C++ Write a program that reads data from a text file

C++ Write a program that reads data from a text file and assigns the vales to a two - dimensional array The text file contains grades of 5 students There are 3 grades for each student (for English, Hitstory Math) The grades shoule be listed in the file sequentially, with the fiest studnts's grades listed first, then the grades of the second student, and so on. 1. Create a text file : grades.txt Enter the grades : A A B-> student #1 CCF-> #2 CDB-> #3 BAC-#4 BAB#5 2. read the file and assign the scores to a 2D array NOTE Include code that will display a message if the file does not open. 3. After read the file, display all grades 4. Calculate and display GPA each student EX : Student #1 has 11 points (4+4+3) GPA # 1 : 3.67 (113) 5.Display average GPA for each of the three subject EX avgGPA for English is 2.80 This is calculated by adding the English column and dividing by 5 (14/5) 6. Note: Use fixed, showpoint, setprecision0 to format all output to 2 places to the right of the decimal point and stw0 to align colums OUTPUT All Grades Student English #1 #2 #3 Histody Math -> #3 display all grades #5 Student GPAs 3.67 1.33 2.00 3.00 3.33 #2 #3 -> #4 display-GPAs #5 Average GPA by subject: English History Math 2.80 3.00 2.20 -> #5 display average GPA each student

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!