PROGRAMMING:Read and write of disk file
Program to build a student class, and create five objects in the main function (the object information is shown in the input example). The data of each object includes the student number num, name, age and the scores of math, English and Chinese, and then calculate the average score ave of each person The name and average score are output to the disk file stud.dat. Finally, the data is read out from the stud.dat file and displayed on the screen.
###Input format:
Data of 5 students (student number, name, age and scores of mathematics, English and Chinese).
###Output format:
Read the student number, name and average score from the stud.dat file.
###Input example:
Here is a set of inputs. For example:
```in
Student stu1(1,'A',19,80,79,67);
Student stu2(2,'B',20,90,68,43);
Student stu3(3,'C',19,56,48,29);
Student stu4(4,'D',20,93,44,57);
Student stu5(5,'E',19,33,55,74);
```
###Output example:
The corresponding output is given here. For example:
```out
1 A 75.3333
2 B 67
3 C 44.3333
4 D 64.6667
5 E 54
```
answer:If there is no answer, please comment
###Input format:
Data of 5 students (student number, name, age and scores of mathematics, English and Chinese).
###Output format:
Read the student number, name and average score from the stud.dat file.
###Input example:
Here is a set of inputs. For example:
```in
Student stu1(1,'A',19,80,79,67);
Student stu2(2,'B',20,90,68,43);
Student stu3(3,'C',19,56,48,29);
Student stu4(4,'D',20,93,44,57);
Student stu5(5,'E',19,33,55,74);
```
###Output example:
The corresponding output is given here. For example:
```out
1 A 75.3333
2 B 67
3 C 44.3333
4 D 64.6667
5 E 54
```
answer:If there is no answer, please comment