大一时自己写的一个东西。。。很简单的一个,不要笑。。你的那个太难了。。#include#include#include#include#includestruct student{ int num; char name[10]; int yuwen; int shuxue; int yingyu; int kexue; int sum; }record[50]; void readin(); void display(); void find(); void order(); void add(); void del(); int menu_select(); int m=5; extern float sum1 =0; extern float sum2=0; extern float sum3=0; extern float sum4 =0; extern int w = 0; void main() { for(;;){ switch(menu_select()){ case 1: readin(); break; case 2: display(); break; case 3: order(); break; case 4: find(); break; case 5: add(); break; case 6: del(); break; case 7: printf("Goodbye!\n"); exit(0); } } }//菜单选择 int menu_select() { char s; int cn; printf("1.输入5个人的数据\n"); printf("2.显示数据\n"); printf("3.数据排序\n"); printf("4.查询数据\n"); printf("5.增加数据\n"); printf("6.删除数据\n"); printf("7.Goodbye\n"); printf("Input 1-7:"); do{ s=getchar(); cn=int(s)-48; }while(cn7); return cn; }//显示数据 void display() { char *c[7]={"学号","姓名","语文","数学","英语","科学","总成绩"}; char *d[1]={"平均成绩"}; int i; printf("\n%8s\t%8s\t%4s\t%4s\t%4s\t%4s\t%4s\n",c[0],c[1],c[2],c[3],c[4],c[5],c[6]); sum1 = 0; sum2 = 0; sum3 = 0; sum4 = 0; for(i=0;i