Question: please help! 7.6 Lab 47: Student Grades in 2D Array Write a program that will read in and save 3 exam grades (exam 1, exam

please help!

please help! 7.6 Lab 47: Student Grades in 2D Array Write a

program that will read in and save 3 exam grades (exam 1,

exam 2, and exam 3) for 5 students in a 2D array

and then output the data in a table Create an array of

7.6 Lab 47: Student Grades in 2D Array Write a program that will read in and save 3 exam grades (exam 1, exam 2, and exam 3) for 5 students in a 2D array and then output the data in a table Create an array of strings of size 5 called studentName [] like in Lab 44. Initialize the array with the following student names: Amanda Baynes, Victor Hughes, Scott Collins, Lori Macbeth, and Mann Lopez (see Pr7-11.cpp for an example). Create a 2-dimensional array of integers of 5 rows and 3 columns called studentGrade [] [] (see Pr7-21.cpp for an example definition of a 2D array). Read in the grades for each student (see Pr7-21.cpp for an example). Each row of this array will contain the exam grades for each student. That is, Amanda's exam 1, exam 2 and exam 3 grades will be contained in studenterade [0][0]. studenterade [0] 1), and studentGrade [0][2] respectively. In nested for loops, print the names of the students along with their grades. The student names should be left justified in a field width of 15 and the exam grades should be right justified in a field width of 8. string student Name ] ("Amanda Baynes", "Victor Hughes", "Scott Collins", "Lori Macbeth", "Manny Lopez"); [0] [1] [2] [3] [4] *Amanda Baynes" "Victor Hughes" "Scott Collins" Lori Macbeth" "Manny Lopez" Sample studentGrade array declaration and example of how it appears in memory: const int NUM STUDENTS - 5, NUM GRADES = 3; int studentGrade [NUM STUDENTS) [NUM GRADES); 1/ Get the grades from the user for (int i = 0; i > studentGrade[i][il; ] ] Column 0 [1] [0] Column 1 [1][1] Column 2 [i][2] Row 0 [0][il 89 90 95 Row 1 [1] [j] 67 78 80 Row 2 [2] [3] 100 91 98 Row 3 [3] [il 75 70 78 Row 4 [4] [1] 78 80 85 Figure 1: (input) 89 90 95 67 78 80 100 91 98 75 70 78 78 80 85 Figure 2: (output) Student Name Exam 1 Exam 2 Exam 3 95 89 67 90 78 80 Amanda Baynes victor Hughes Scott Collins Lori Macbeth Manny Lopez 91 98 100 75 70 78 78 85 266488 1697136 LAB ACTIVITY 7.6.1 Lab 47 Student Grades in 2D Array ao de 217 CS 1336.exe 5 // Preprocessor directives 7 int main() 9 V Variable definitions Sample nested for loop to read in the grades from the user. for (int i = 0; i studentGrade[i][j]; 18 3 2e 11 Output table headers 21 22 // Loop through arrays using nested for loops to output names and grades in a table 23 24 25 return; 26 }

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!