Store input file containing matrix of numbers into 2d array

Given an input file named grades.dat containing:
8
80 90 70 100 60 90 85 78 93 80
98 85 100 99 89 90 72 0 78 98
85 60 25 98 89 94 65 0 56 72
96 86 72 100 100 98 100 100 24 43
67 83 32 50 56 87 90 0 0 68
98 84 98 99 83 95 78 90 92 90
89 90 95 86 87 97 88 70 96 68
79 60 54 89 67 78 38 90 93 78

The rows represent the number of students and the columns the number of labs.

Professor instructions:
Read in the number of students from file
Print out the number of students and the number of labs
Declare your 2D array
Read in the values from the file and save them in your array
Call the studentAverage function.

Expected Output:
There are 8 students.
There are 10 assignments.

Average student score:
Student 1: 82.6
Student 2: 80.9
Student 3: 64.4
Student 4: 81.9
Student 5: 53.3
Student 6: 90.7
Student 7: 86.6
Student 8: 72.6

The overall average lab score is: 76.625

Additional instructions:
Please submit something without using EOF!
Any help is greatly appreciated!
Last edited on
Do you know how to read / write from file?
OP: you've just copied and pasted your homework, show some tangible effort until the point your get stuck and/or raise specific questions re issues that preclude you from making a start
Last edited on
Topic archived. No new replies allowed.