FILES OF RECORDS
Files can also contain records. Using read or write,
it is possible to transfer a record at a time.
PROGRAM TWENTY_FIVE
Implement a Pascal program which allows the recalling of a group
of student marks. The program is to output the highest and lowest
marks, as well as the mean.
Use an array of records to store the names and marks. Using an output file, sort the student names, marks into ascending order, so that the student with the highest mark will be written first.
The details are,
Student 1 Joe Bloggs 56
2 Bill Anderson 24
3 William Tell 78
4 Bob Crane 23
5 Peter Hall 57
6 Charles French 76
7 Bryan Goldwater 65
8 Stewart Phelps 89
9 Dave Stevens 78
10 Ted Rosse 64
The student name consists of 16 characters, and the student mark is an integer in the range 0 to 100. Our example has a maximum of ten students.