Question: HW 2d Student Grades (Pass a 2D array to functions) Create a new project and name it: Student_Grades Create two files: main.cpp - - grades.dat
HW 2d Student Grades (Pass a 2D array to functions) Create a new project and name it: Student_Grades Create two files: main.cpp - - grades.dat Write a program that reads data from a text file and assigns the values to a two-dimensional array. The text file contains grades of 5 students. There are 3 grades for each student (for English, History, and Math). The grades should be listed in the file sequentially, with the first student's grades listed first then the grades of the second student, and so on. 1.) Create a text file in your project's Resource Files folder. o Name the file: grades.dat Enter the following grades into the file: A A o Grades for Student #1 (In order: English, History, and Math) B (Just enter the grades not the comments.) c Grades for Student #2 t 2013, Dennis Rainey OUTPUT: Page 6 of 6 All Grades student English #1 #2 #3 #4 #5 History Math #3-Display all grades Student Student #1 #2 #3 #4 #5 GPAs 3.67 1 , 33 #4-Display student GPAs 2.00 3.00 3.33 Average GPA by Subject English 2.80 #5-Display the average GPA of each subject. History 3.00 Math 2.20
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
