You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
987 B
41 lines
987 B
#include "mysyslib.h"
|
|
|
|
int mainMenu(ss *stu) {
|
|
char out[6][8] = {"input","delete","Modify","order","output","quit"};
|
|
for(int i=1;i<7;i++){
|
|
for(int j=0;j<30;j++){
|
|
printf(" ");
|
|
}
|
|
printf("%d.%s\n",i,out[i-1]);
|
|
}
|
|
int ipt;
|
|
scanf("%d",&ipt);
|
|
switch(ipt){
|
|
case 1:
|
|
printf("You are trying to Input info\n");
|
|
input(stu); //录入学生信息
|
|
break;
|
|
case 2:
|
|
printf("You are trying to Delete info\n");
|
|
cancel(stu); //删除学生信息
|
|
break;
|
|
case 3:
|
|
printf("You are trying to Modify info\n");
|
|
ModifyInfo(stu); //修改学生信息
|
|
break;
|
|
case 4:
|
|
printf("You are trying to Make things ordered\n");
|
|
Order(stu);
|
|
break;
|
|
case 5:
|
|
printf("You are trying to Output info\n");
|
|
allPrint(stu); //输出所有学生信息
|
|
break;
|
|
case 6:
|
|
printf("You are about to Quit\n");
|
|
break;
|
|
default:
|
|
printf("Wrong input\n");
|
|
}
|
|
return (ipt==6)?1:0;
|
|
} |