There are 10 people in a class (the specific number is entered by the keyboard) to take the final exam, and there are 3 exams. Define the structure type to describe student information. Each student information includes: student ID, name, grades of multiple courses, total grades and average grades. Using the array of structures as the function parameters, program the student achievement management system as follows.
(1) Enter each student's student ID, name, and test scores for each subject.
(2) Calculate the total score and average score of each course.
(3) Calculate the total score and average score of each student.
(4) Output each student's student ID, name, test scores of each subject, and the total and average scores of each course.