这个系统实现两个功能,分别是管理教师的信息和学生的成绩,用户可以选择切换实现相应的功能。话不多说了,现在看下程序的实现截图:
这里给出程序代码下载地址:http://download.csdn.net/detail/dlutbrucezhang/5191828
下面贴出部分代码:
void add_tea(Teacher tea[]) { int i=0,j,num; char str[5]; if(numtea!=0) { printf("cover the current record?(y/n)\n"); gets(str); if(str[0]=='Y'||str[0]=='y') i=0; else i=numtea; } printf("Please input the number of you add the teachers:"); scanf("%d",&num); if(i==0) numtea=num; else numtea+=num; if(numtea>lens) { lens+=10; tea=(Teacher *)realloc(tea,lens*SIZE); } printf("Please input the teacher's info:\n"); for(;i<numtea;i++) { getchar(); printf("please input the teacher's NO.:"); gets(tea[i].number); printf("please input the teacher's name:"); gets(tea[i].name); printf("please input the teacher's sex(man/woman 0/1):"); gets(tea[i].sex); if(tea[i].sex[0]=='0') strcpy(tea[i].sex,"man"); else strcpy(tea[i].sex,"woman"); printf("please