#include #include struct Student//定义学生结构体 { char id[20]; char name[20]; int class; double score1; double score2; double score3; double score; }student[10]; int numstudents=0; void PrintMenu()//打印菜单以供选择 { printf(" 1.input\n"); printf(" 2.delete\n"); printf(" 3.select\n"); printf(" 4.order\n"); printf(" 5.output\n"); printf(" 6.update\n"); printf(" 7.quit\n"); } void Input()//输入学生信息 { char a; do { printf("Please input information:\n"); scanf("%s",&student[numstudents].id); scanf("%s",&student[numstudents].name); scanf("%d",&student[numstudents].class); scanf("%lf",&student[numstudents].score1); scanf("%lf",&student[numstudents].score2); scanf("%lf",&student[numstudents].score3); student[numstudents].score=student[numstudents].score1+student[numstudents].score2+student[numstudents].score3; numstudents++; printf("continue?(y or n)");//选择是否要继续输入学生信息 fflush(stdin); scanf("%c",&a); }while(a=='y'); } void Printinformation()//打印学生信息 { for(int i=0;istudent[j+1].class) { temp=student[j]; student[j]=student[j+1]; student[j+1]=temp; } } } int start=0;//将按照班级排好序的学生按照成绩在班级内部排序 for(int i=0;i