资源描述:
《C语言学生信息管理系统(完整版)》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、#definePRINT0printf("name:%ssex:%sage:%dID_card:%daddress:%s",st[i].name,st[i].sex,st[i].age,st[i].ID_card,st[i].addr)#definePRINT1printf("prefession:%sstudent_number:%d*****score*****wuli:%d",st[i].prefession,st[i].student_number,st[i].score.wuli)#definePRINT2printf("gaosh
2、u:%dyingyu:%dtiyu:%daverage:%d",st[i].score.gaoshu,st[i].score.yingyu,st[i].score.tiyu,st[i].score.aver)#defineprint1printf("________________________________")#defineN2#include"string.h"#include"stdio.h"intsum=0;structscore{intwuli;intgaoshu;intyingyu;inttiyu;intaver;};structmessage{
3、charname[10];intage;charsex[5];intID_card;charaddr[30];charprefession[30];intstudent_number;structscorescore;}st[100];/*************writemessage*************/write_message(){intflag;charchioce;do{system("cls");flag=2;sum++;printf("_______________________________");printf("pleaseinputstudent'
4、smessage:");printf("");print1;printf("%dthstudentmessage:",sum);print1;printf("name:");scanf("%s",st[sum].name);printf("sex:");scanf("%s",st[sum].sex);printf("age:");scanf("%d",&st[sum].age);printf("ID_card:");scanf("%d",&st[sum].ID_card);printf("address:");scanf("%s",st[sum].a
5、ddr);printf("prefession:");scanf("%s",st[sum].prefession);printf("schoolnumber:");scanf("%d",&st[sum].student_number);printf("*****score******");printf("wuli:");scanf("%d",&st[sum].score.wuli);printf("gaoshu:");scanf("%d",&st[sum].score.gaoshu);printf("yingyu:");scanf("%d",&st[su
6、m].score.yingyu);printf("tiyu:");scanf("%d",&st[sum].score.tiyu);printf("average:");scanf("%d",&st[sum].score.aver);do{printf("****************************");printf("pressy/Ycontinue:pressn/Nstop:");getchar();scanf("%c",&chioce);printf("****************************");if(chioce=='
7、y'
8、
9、chioce=='Y'){flag=1;break;}elseif(chioce=='n'
10、
11、chioce=='N'){flag=0;break;}elseprintf("inputerror");print1;printf("");}while(1);}while(flag==1);save_message();}/*************savemessage****************/save_message(){FILE*fp;inti;if((fp=fope