Guest_imported
New member
- Jan 1, 1970
- 0
I have data in notepad that looks exactly like this...
CPSC230 01
SPRING 01
6
able 90 90
baker 80 80
charlie 70 70
delta 60 60
fox 59 59
echo 0 0
The problem I"m having is reading in the data and outputting it. What I want the program to do is read in all the lines, but it needs to store the number on the third line (in this case the 6) because that is the number of students (so the number could be 10, 4, 1 etc...) As far as outputting It should output the thirst two lines regular, but then should output the last 6 lines (students and their grades) with the format
STUDENT:
MIDTERM:
FINAL:
the midterm being the first grade and the final being the second. If anyone can please help me figure out the code for this that would be greatly appreciated. Thanks
CPSC230 01
SPRING 01
6
able 90 90
baker 80 80
charlie 70 70
delta 60 60
fox 59 59
echo 0 0
The problem I"m having is reading in the data and outputting it. What I want the program to do is read in all the lines, but it needs to store the number on the third line (in this case the 6) because that is the number of students (so the number could be 10, 4, 1 etc...) As far as outputting It should output the thirst two lines regular, but then should output the last 6 lines (students and their grades) with the format
STUDENT:
MIDTERM:
FINAL:
the midterm being the first grade and the final being the second. If anyone can please help me figure out the code for this that would be greatly appreciated. Thanks