ZY_显示菜单并获得输入选项

ZY_显示菜单并获得输入选项
zhangyu 2 years ago
parent 5570fb65d5
commit fd28057d9d

@ -154,24 +154,24 @@ int main(void)
int Menu(void) int Menu(void)
{ {
int itemSelected; int itemSelected;
printf("Management for Studets' scores\n"); printf("Management for Students' scores\n");
printf("1.Input record\n"); printf("1.Input record\n");
printf("2.Calculate total and average score of every course\n"); printf("2.Calculate total and average score of every course\n");
printf("3.Calculate total and average score of evry students\n"); printf("3.Calculate total and average score of evry student\n");
printf("4.Sort in descending order by score\n"); printf("4.Sort in descending order by score\n");
printf("5.Sort in ascending order by score\n"); printf("5.Sort in ascending order by score\n");
printf("6.Sort in ascending order by name\n"); printf("6.Sort in ascending order by number\n");
printf("7.Sort in dictionary order by name\n"); printf("7.Sort in dictionary order by name\n");
printf("8.Search by number\n"); printf("8.Search by number\n");
printf("9.Search by name\n"); printf("9.Search by name\n");
printf("10.Statisit analysis\n"); printf("10.Statistic analysis\n");
printf("11.List record\n"); printf("11.List record\n");
printf("12.Write to a file\n"); printf("12.Write to a file\n");
printf("13.Read from a file\n"); printf("13.Read from a file\n");
printf("0.Exit\n"); printf("0.Exit\n");
printf("Please Input your choice:"); printf("Please Input your choice:");
scanf("%d",&itemSelected); //读入用户输入 scanf("%d",&itemSelected); //读入用户输入
return itemSeleted; return itemSelected;
} }
``` ```

Loading…
Cancel
Save