永发信息网

一个《学生成绩管理系统》用c语言怎么写!急救!请各位帮忙!

答案:1  悬赏:10  手机版
解决时间 2021-04-04 21:22
  • 提问者网友:蔚蓝的太阳
  • 2021-04-04 07:20
一个《学生成绩管理系统》用c语言怎么写!急救!请各位帮忙!
最佳答案
  • 五星知识达人网友:零点过十分
  • 2021-04-04 07:38
你很幸运,我刚做完,保证对的,你只要把学科改一下就行了,我的是语文数学英语,你把它改成你要的学科就行了,记得把分给我哦 #include #include #include #include #define InputRcd 1 #define UpdateRcd 2 #define SelectRcd 3 #define Exit 4 #define NAMELEN 16 #define CLASSLEN 6 struct record { char classID[CLASSLEN]; int term; char name[NAMELEN]; int chinese,math,english; }; void showProgInform() { printf("-------------------------------------------------\n"); printf("| *** STUDENTS' SCORE PLATFORM *** |\n");; printf("-------------------------------------------------\n\n"); } void showMenu() { system("cls"); showProgInform(); printf("Please select an operation fo the following MENU: \n"); printf(" 1. Input a record \n"); printf(" 2. Update a record\n"); printf(" 3. Select record(s)\n"); printf(" 4. Exit. \n"); } void inputRecord() { struct record inscr; FILE * fp; system("cls"); showProgInform(); printf("Mention: You are to add new record\n\n"); printf("Please input by the following instructions: \n"); printf("Class ID: "); scanf("%s",inscr.classID); printf("Term Number: "); scanf("%d",&(inscr.term)); printf("Student Name: "); scanf("%s",inscr.name); printf("Chinese score: "); scanf("%d",&(inscr.chinese)); printf("Math score: "); scanf("%d",&(inscr.math)); printf("English Score: "); scanf("%d",&(inscr.english)); getchar(); if((fp=(fopen("stu_score.rcd","ab+")))==NULL) { printf("Input record failed!\n"); return; } fwrite(&inscr,sizeof(struct record),1,fp); fclose(fp); if((fp=fopen("stu_score.txt","ab+"))==NULL) { return; } fprintf(fp,"%s-%d %s: %d %d %d\r\n",inscr.classID,inscr.term,inscr.name,inscr.chinese,inscr.math,inscr.english);; fclose(fp); } void showSingleRecord(struct record rc) {
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯