C语言学籍管理系统

由学生成绩管理系统修改,并且进一步完善,修复了学生管理系统的许多bug。

需求
(1) 系统启动后,弹出一个用户界面,能实现人机交互的功能。而且只能通过界面菜单命令实现各种功能(包括系统退出功能),可以设计欢迎词。
(2) 学生基本信息录入:录入信息包括学号、姓名、性别、宿舍号、电话号码等。
(3) 学生成绩基本信息录入: 学号、课程编号、课程名称、学分、平时成绩、实验成绩、卷面成绩。
(4) 计算综合成绩:若本课程无实验(如实验成绩为-1),综合成绩=平时成绩30% +卷面成绩70%;若本课程有实验(如实验成绩不为-1),综合成绩=平时成绩15%+实验成绩15%+卷面成绩*70%。
(5) 计算实得学分:采用等级学分制。综合成绩在90—100分之间,实得学分=学分x100%;综合成绩在80—90分之间,实得学分=学分x80%;综合成绩在70—80分之间,实得学分=学分x75%;综合成绩在60—70分之间,实得学分=学分x60%;综合成绩在60分以下,实得学分=学分x0%;
(6) 学生基本情况的查询并输出:输入一个学生的学号或姓名,可查询出此学生的基本信息并显示输出;输入一个宿舍号码,可查询出本宿舍所有学生的基本信息并显示输出。
(7) 学生成绩信息的查询并输出:输入一个学生的学号或姓名,可查询出此学生的所有课程情况。(如输出:学号,姓名,课程编号,课程姓名,综合成绩,实得学分等,并统计学生共修课程数目以及实得总学分值。)
(8) 排序(分别按综合成绩和实得学分),输出按照综合成绩(或实得学分)升序或降序排序后的学生信息以及对应的课程成绩信息(或实得学分信息)。
(9) 成绩修改:查找后修改成绩,修改后按照综合成绩重新排序,并输出学生信息和对应课程成绩和综合成绩。
(10) 成绩追加:增补遗漏的学生以及对应的信息和对应的课程成绩,并计算出综合成绩和实得学分,增补以后重新排序,并输出新增学生信息和对应课程成绩和综合成绩。

附加功能
(11) 删除学生信息:删除不需要的学生对应的记录(包括姓名、学号、课程、成绩等)。
(12) 成绩(学分)分段:将学生成绩(学分)分段。
(13) 文件存储:把学生信息和对应的课程成绩信息存入到文件中。
(14) 文件输出:输出文件中的内容。
(15) 文件导入:从文件中导入数据到学籍管理系统中,然后进行管理。

代码

#include <stdio.h>
#include <windows.h> 
#include <stdlib.h>
#include <string.h>
#pragma warning(disable : 4996)//关闭编译器报错
struct basic//基础信息
{char id[30],name[10],sex[5],dom[5], tel[20];
};struct sco//基本成绩
{struct chinese//语文{char credit[5], daily[5], experi[5],paper[5];float overal=0, real_credit=0;bool has=false;}ch;struct math//数学{char credit[5], daily[5], experi[5], paper[5];float overal=0, real_credit=0;bool has=false;}ma;struct english//英语{char credit[5], daily[5], experi[5], paper[5];float overal=0, real_credit=0;bool has=false;}en;struct pysicalexercise//体育{char credit[5], daily[5], experi[5], paper[5];float overal=0, real_credit=0;bool has=false;}pe;struct softwareeng//专业{char credit[5], daily[5], experi[5], paper[5];float overal=0, real_credit=0;bool has=false;}se;float overal_aver=0,credit_aver=0;
};struct student//学生结构
{struct basic basic;//包含基础信息struct sco sco;//包含基本成绩
};
void Paint_Start();//绘制开始菜单
void insert_score();//成绩录入
void insert_info();//信息录入
void insert_File();//文件导入
void list();//排序输出
void find_info();//查找信息
void find_score();//查询成绩
void add();//添加条目
void del();//删除成绩
void savefile();//保存到文件,假保存,真效果
void outfile();//输出文件里的学生信息和成绩
void edit();//更改成绩,查找出来,再进行修改
void div();//成绩分段,分三段,我随意void end();//结束动画
int ifnum(char item[]);//用来在各模块中输入数字时,判断是不是数字
int main()
{system("color 02");//先打印个郑州轻工业大学图标纪念一下printf("\n\n\n\n\n\t\t\t\t\t                 *\n");printf("\t\t\t\t\t            *  ***  ****\n");printf("\t\t\t\t\t          *** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t          **** ******* ****\n");printf("\t\t\t\t\t            *************\n");printf("\t\t\t\t\t                *****\n\n");printf("\t\t\t\t\t         欢迎使用学籍管理系统\n");printf("\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t    ");system("pause");Paint_Start();//打印开始菜单,进入功能选择return 0;
} 
//绘制菜单
void Paint_Start()
{system("cls");printf("***********************************************************************************************************************\n");printf("*\t\t\t\t\t\t   学籍管理系统\t\t\t\t\t\t\t      *\n");printf("*\t\t1.信息录入\t\t2.成绩录入\t\t3.信息查询\t\t4.成绩查询\t\t      *\n");printf("*\t\t5.排序查看\t\t6.成绩修改\t\t7.成绩追加\t\t8.删除数据\t\t      *\n");printf("*\t\t9.成绩分段\t\t10.文件储存\t\t11.文件输出\t\t12.文件导入\t\t      *\n");printf("***********************************************************************************************************************\n\t\t\t\t\t\t <输入0炫酷退出>\n");printf("执行编号:");int num;//储存功能编号scanf("%d", &num);//接收编号,准备判断需求while (getchar() != '\n')continue;//忽略多余输入,类似清空缓冲区switch (num)//选择功能{case 0:end(); break;case 1:insert_info(); break;//信息录入case 2:insert_score(); break;//成绩录入case 3:find_info(); break;//信息查询case 4:find_score(); break;//成绩查询case 5:list(); break;//输出排序case 6:edit(); break;//修改成绩case 7:add(); break;//成绩和信息的追加case 8:del(); break;//删除数据case 9:div(); break;//成绩分段case 10:savefile(); break;//储存文件case 11:outfile(); break;//输出文件的内容case 12:insert_File(); break;//导入文件的内容到数据库default:printf("请选择对应的序号!"); system("pause"); Paint_Start();}
}
//录入成绩
void insert_score()
{system("cls");printf("\n\n\n\n\n\n\n\n\n\n\t\t\t\t    注意:请输入对应的正确内容,否则记录将出现错误!\n\n\t\t\t\t\t\t  ");//提示一下用户system("pause");system("cls");printf("*****************************************************成绩录入***********************************************************\n");printf("依次键入学号、课程编号(A-E)、课程名称(以编号为准)、学分、平时成绩、实验成绩、卷面成绩,用一个空格隔开各数据,每一条输入完成后按回车键进行下一条输入。\n\t\t\t\t\t\t<输入'#'并回车退出>\n例如:\n541913460230 A 语文 3 66 78 82\n");printf("在此输入:\n");student stu;char id[30],subid[5],subname[10],daily[5],credit[5],experi[5],paper[5];//定义变量储存输入值,用于判断,无错误则将其赋值给stu对应变量,最后把stu结构体写入文件bool err;FILE* fp;fp = fopen("stu.db", "rb+");//读写if (fp == NULL){printf("文件打开失败!\n");system("pause");Paint_Start();}while (1){err = false;//错误标记变量,初始为无错memset(id,0,30);//清空各数组所占内存的内容,都变成空,方便后续判断memset(subid,0,5);memset(subname,0,10);memset(credit,0,5);memset(daily,0,5);memset(experi,0,5);memset(paper, 0, 5);//这样以后,所有元素都变成\0了scanf("%s",id);if (id[0] == '#'){fcloseall();break;}scanf(" %s %s %s %s %s %s", subid, subname, credit, daily, experi, paper);while (getchar() != '\n')continue;if (ifnum(id) && id[11] != '\0' && id[12] == '\0');//是否是数字,是否符合12位数else{printf("请检查学号输入是否正确,并重新输入!\n");err = true;//若出错,则错误标记改为 错}if (subid[0] >= 'A' && subid[0] <= 'E' && subid[1] == '\0');//是否是数字,是否有效实际else{printf("请检查课程编号输入是否正确,并重新输入!\n");err = true;}if (ifnum(credit));else{printf("请检查学分输入是否正确,并重新输入!\n");err = true;}if (ifnum(daily) && ((daily[0] == '1' && daily[1] == '0' && daily[2] == '0') || (daily[2] == '\0' && daily[3] != '\0') || daily[2] == '\0'));else{printf("请检查平时成绩输入是否正确,并重新输入!\n");err = true;}if (ifnum(experi) && ((experi[0] == '1' && experi[1] == '0' && experi[2] == '0') || (experi[2] == '\0' && experi[3] != '\0') || experi[2] == '\0'));else{printf("请检查实验成绩输入是否正确,并重新输入!\n");err = true;}if (ifnum(paper) && ((paper[0] == '1' && paper[1] == '0' && paper[2] == '0') || (paper[2] == '\0' && paper[3] != '\0') || paper[2] == '\0'));else{printf("请检查卷面成绩输入是否正确,并重新输入!\n");err = true;}if (err == false){//此处写入磁盘文件int exist = 0;//是否存在同一个人的标记变量,用于查重标记while (fgetc(fp) != EOF){fseek(fp, -1L, 1);fread(&stu, 240, 1, fp);if (strcmp(stu.basic.id, id) == 0)//对比学号是否一样{exist = 1;//存在此人switch (subid[0])//根据录入的科目编号将各项成绩信息计算并存入stu结构体{case 'A':{stu.sco.ch.has = true;strcpy(stu.sco.ch.credit, credit);strcpy(stu.sco.ch.daily, daily);strcpy(stu.sco.ch.experi, experi);strcpy(stu.sco.ch.paper, paper);float credittemp;if (credit[2] == '0') credittemp = 100;else if (credit[1] != '\0')credittemp = ((int)credit[0] - 48) * 10 + (int)credit[1] - 48;else credittemp = (int)credit[0] - 48;float dailytemp, papertemp, experitemp;if (daily[2] == '0') dailytemp = 100;else if (daily[1] != '\0')dailytemp = ((int)daily[0] - 48) * 10 + (int)daily[1] - 48;else dailytemp = (int)daily[0] - 48;if (paper[2] == '0') papertemp = 100;else if (paper[1] != '\0')papertemp = ((int)paper[0] - 48) * 10 + (int)paper[1] - 48;else papertemp = (int)paper[0] - 48;if (strcmp(experi, "-1") == 0){stu.sco.ch.overal = dailytemp * 0.3 + papertemp * 0.7;}else{if (experi[2] == '0') experitemp = 100;else if (experi[1] != '\0')experitemp = ((int)experi[0] - 48) * 10 + (int)experi[1] - 48;else experitemp = (int)experi[0] - 48;stu.sco.ch.overal = dailytemp * 0.15 + experitemp * 0.15 + papertemp * 0.7;}if (stu.sco.ch.overal >= 90 && stu.sco.ch.overal <= 100)stu.sco.ch.real_credit = credittemp;else if (stu.sco.ch.overal < 90 && stu.sco.ch.overal >= 80) stu.sco.ch.real_credit = credittemp * 0.8;else if (stu.sco.ch.overal < 80 && stu.sco.ch.overal >= 70) stu.sco.ch.real_credit = credittemp * 0.75;else if (stu.sco.ch.overal < 70 && stu.sco.ch.overal >= 60) stu.sco.ch.real_credit = credittemp * 0.6;else stu.sco.ch.real_credit = 0;}; break;case 'B':{stu.sco.ma.has = true;strcpy(stu.sco.ma.credit, credit);strcpy(stu.sco.ma.daily, daily);strcpy(stu.sco.ma.experi, experi);strcpy(stu.sco.ma.paper, paper);float credittemp;if (credit[2] == '0') credittemp = 100;else if (credit[1] != '\0')credittemp = ((int)credit[0] - 48) * 10 + (int)credit[1] - 48;else credittemp = (int)credit[0] - 48;float dailytemp, papertemp, experitemp;if (daily[2] == '0') dailytemp = 100;else if (daily[1] != '\0')dailytemp = ((int)daily[0] - 48) * 10 + (int)daily[1] - 48;else dailytemp = (int)daily[0] - 48;if (paper[2] == '0') papertemp = 100;else if (paper[1] != '\0')papertemp = ((int)paper[0] - 48) * 10 + (int)paper[1] - 48;else papertemp = (int)paper[0] - 48;if (strcmp(experi, "-1") == 0){stu.sco.ma.overal = dailytemp * 0.3 + papertemp * 0.7;}else{if (experi[2] == '0') experitemp = 100;else if (experi[1] != '\0')experitemp = ((int)experi[0] - 48) * 10 + (int)experi[1] - 48;else experitemp = (int)experi[0] - 48;stu.sco.ma.overal = dailytemp * 0.15 + experitemp * 0.15 + papertemp * 0.7;}if (stu.sco.ma.overal >= 90 && stu.sco.ma.overal <= 100)stu.sco.ma.real_credit = credittemp;else if (stu.sco.ma.overal < 90 && stu.sco.ma.overal >= 80) stu.sco.ma.real_credit = credittemp * 0.8;else if (stu.sco.ma.overal < 80 && stu.sco.ma.overal >= 70) stu.sco.ma.real_credit = credittemp * 0.75;else if (stu.sco.ma.overal < 70 && stu.sco.ma.overal >= 60) stu.sco.ma.real_credit = credittemp * 0.6;else stu.sco.ma.real_credit = 0;}; break;case 'C':{stu.sco.en.has = true;strcpy(stu.sco.en.credit, credit);strcpy(stu.sco.en.daily, daily);strcpy(stu.sco.en.experi, experi);strcpy(stu.sco.en.paper, paper);float credittemp;if (credit[2] == '0') credittemp = 100;else if (credit[1] != '\0')credittemp = ((int)credit[0] - 48) * 10 + (int)credit[1] - 48;else credittemp = (int)credit[0] - 48;float dailytemp, papertemp, experitemp;if (daily[2] == '0') dailytemp = 100;else if (daily[1] != '\0')dailytemp = ((int)daily[0] - 48) * 10 + (int)daily[1] - 48;else dailytemp = (int)daily[0] - 48;if (paper[2] == '0') papertemp = 100;else if (paper[1] != '\0')papertemp = ((int)paper[0] - 48) * 10 + (int)paper[1] - 48;else papertemp = (int)paper[0] - 48;if (strcmp(experi, "-1") == 0){stu.sco.en.overal = dailytemp * 0.3 + papertemp * 0.7;}else{if (experi[2] == '0') experitemp = 100;else if (experi[1] != '\0')experitemp = ((int)experi[0] - 48) * 10 + (int)experi[1] - 48;else experitemp = (int)experi[0] - 48;stu.sco.en.overal = dailytemp * 0.15 + experitemp * 0.15 + papertemp * 0.7;}if (stu.sco.en.overal >= 90 && stu.sco.en.overal <= 100)stu.sco.en.real_credit = credittemp;else if (stu.sco.en.overal < 90 && stu.sco.en.overal >= 80) stu.sco.en.real_credit = credittemp * 0.8;else if (stu.sco.en.overal < 80 && stu.sco.en.overal >= 70) stu.sco.en.real_credit = credittemp * 0.75;else if (stu.sco.en.overal < 70 && stu.sco.en.overal >= 60) stu.sco.en.real_credit = credittemp * 0.6;else stu.sco.en.real_credit = 0;}; break;case 'D':{stu.sco.pe.has = true;strcpy(stu.sco.pe.credit, credit);strcpy(stu.sco.pe.daily, daily);strcpy(stu.sco.pe.experi, experi);strcpy(stu.sco.pe.paper, paper);float credittemp;if (credit[2] == '0') credittemp = 100;else if (credit[1] != '\0')credittemp = ((int)credit[0] - 48) * 10 + (int)credit[1] - 48;else credittemp = (int)credit[0] - 48;float dailytemp, papertemp, experitemp;if (daily[2] == '0') dailytemp = 100;else if (daily[1] != '\0')dailytemp = ((int)daily[0] - 48) * 10 + (int)daily[1] - 48;else dailytemp = (int)daily[0] - 48;if (paper[2] == '0') papertemp = 100;else if (paper[1] != '\0')papertemp = ((int)paper[0] - 48) * 10 + (int)paper[1] - 48;else papertemp = (int)paper[0] - 48;if (strcmp(experi, "-1") == 0){stu.sco.pe.overal = dailytemp * 0.3 + papertemp * 0.7;}else{if (experi[2] == '0') experitemp = 100;else if (experi[1] != '\0')experitemp = ((int)experi[0] - 48) * 10 + (int)experi[1] - 48;else experitemp = (int)experi[0] - 48;stu.sco.pe.overal = dailytemp * 0.15 + experitemp * 0.15 + papertemp * 0.7;}if (stu.sco.pe.overal >= 90 && stu.sco.pe.overal <= 100)stu.sco.pe.real_credit = credittemp;else if (stu.sco.pe.overal < 90 && stu.sco.pe.overal >= 80) stu.sco.pe.real_credit = credittemp * 0.8;else if (stu.sco.pe.overal < 80 && stu.sco.pe.overal >= 70) stu.sco.pe.real_credit = credittemp * 0.75;else if (stu.sco.pe.overal < 70 && stu.sco.pe.overal >= 60) stu.sco.pe.real_credit = credittemp * 0.6;else stu.sco.pe.real_credit = 0;}; break;case 'E':{stu.sco.se.has = true;strcpy(stu.sco.se.credit, credit);strcpy(stu.sco.se.daily, daily);strcpy(stu.sco.se.experi, experi);strcpy(stu.sco.se.paper, paper);float credittemp;if (credit[2] == '0') credittemp = 100;else if (credit[1] != '\0')credittemp = ((int)credit[0] - 48) * 10 + (int)credit[1] - 48;else credittemp = (int)credit[0] - 48;float dailytemp, papertemp, experitemp;if (daily[2] == '0') dailytemp = 100;else if (daily[1] != '\0')dailytemp = ((int)daily[0] - 48) * 10 + (int)daily[1] - 48;else dailytemp = (int)daily[0] - 48;if (paper[2] == '0') papertemp = 100;else if (paper[1] != '\0')papertemp = ((int)paper[0] - 48) * 10 + (int)paper[1] - 48;else papertemp = (int)paper[0] - 48;if (strcmp(experi, "-1") == 0){stu.sco.se.overal = dailytemp * 0.3 + papertemp * 0.7;}else{if (experi[2] == '0') experitemp = 100;else if (experi[1] != '\0')experitemp = ((int)experi[0] - 48) * 10 + (int)experi[1] - 48;else experitemp = (int)experi[0] - 48;stu.sco.se.overal = dailytemp * 0.15 + experitemp * 0.15 + papertemp * 0.7;}if (stu.sco.se.overal >= 90 && stu.sco.se.overal <= 100)stu.sco.se.real_credit = credittemp;else if (stu.sco.se.overal < 90 && stu.sco.se.overal >= 80) stu.sco.se.real_credit = credittemp * 0.8;else if (stu.sco.se.overal < 80 && stu.sco.se.overal >= 70) stu.sco.se.real_credit = credittemp * 0.75;else if (stu.sco.se.overal < 70 && stu.sco.se.overal >= 60) stu.sco.se.real_credit = credittemp * 0.6;else stu.sco.se.real_credit = 0;}//已经全部存入stu}fseek(fp, -240L, 1);fwrite(&stu, 240, 1, fp);break;}}if (exist == 0) printf("查无此人,请先录入该学生基本信息!\n");rewind(fp);}}fcloseall();Paint_Start();return;
}
void insert_info()
{system("cls");printf("\n\n\n\n\n\n\n\n\n\n\t\t\t\t    注意:请输入对应的正确内容,否则记录将出现错误!\n\n\t\t\t\t\t\t  ");system("pause");system("cls");printf("*****************************************************信息录入***********************************************************\n");printf("依次键入学号、姓名、性别、宿舍号码、电话号码,用一个空格隔开各数据,每一条输入完成后按回车键进行下一条输入。\n\t\t\t\t\t\t退出(输入'#'并回车)\n样例:\n541913460230 喵辰汐 男 113 10086\n");printf("在此输入:\n");FILE* fp;student stu;bool err;char id[30], name[10], sex[5]="", dom[5], tel[20];while (true){err = false;fp = fopen("stu.db", "rb+");if (fp == NULL){fp = fopen("stu.db", "wb");fclose(fp);fp = fopen("stu.db", "rb+");}memset(id,0,30);memset(name, 0, 10);memset(sex, 0, 5);memset(dom, 0, 5);memset(tel, 0, 20);scanf("%s",id);if (id[0] == '#'){fclose(fp);break;}scanf(" %s %s %s %s",name,sex,dom,tel);while (getchar() != '\n')continue;bool isname = true;for (int i = 0; i <= 7; i++){if (name[i] >= 32 && name[i] <= 127) isname = false;//仅判断是否是ASCII中的字符}if (name[8] == '\0' && isname == true)//一个中文字符占两个字节{strcpy(stu.basic.name, name);}else{printf("请检查姓名输入是否正确,并重新输入!\n");err = true;}if (ifnum(id) && id[11] != '\0' && id[12] == '\0') strcpy(stu.basic.id, id);else{printf("请检查学号输入是否正确,并重新输入!\n");err = true;}if (strcmp(sex, "男") == 0 || strcmp(sex, "女") == 0) strcpy(stu.basic.sex, sex);else{printf("请检查性别输入是否正确,并重新输入!\n");err = true;}if (ifnum(dom)) strcpy(stu.basic.dom, dom);else{printf("请检查宿舍号码输入是否正确,并重新输入!\n");err = true;}if (ifnum(tel)) strcpy(stu.basic.tel, tel);else{printf("请检查电话号码输入是否正确,并重新输入!\n");err = true;}if (err == false){int exist=0;student _stu=stu;while (fgetc(fp) != EOF)//遍历{fseek(fp, -1L, 1);fread(&_stu, 240, 1, fp);if (strcmp(_stu.basic.id, id) == 0)//找到相同项{exist = 1;printf("已有此人!\n");break;}}if (exist == 0)//文件指针已在末尾{fwrite(&stu, 240, 1, fp);//写入文件}}fclose(fp);}Paint_Start();
}
void insert_File()//文件导入
{char dir[50] = "";//存放 导入的文件的绝对路径的 字符串变量FILE* fp,*fpp;student stu;printf("输入文件的绝对路径(例如C:\\abc123.db):\n");scanf("%s", dir);//输入绝对路径while (getchar() != '\n')continue;//忽略多余输入if ((fpp = fopen("stu.db", "ab")) == NULL)//以二进制追加方式打开数据库文件{printf("数据库打开失败!\n");system("pause");Paint_Start();return;}if (fpp == NULL){fpp = fopen("stu.db", "wb");fclose(fpp);fpp = fopen("stu.db","ab");}if ((fp = fopen(dir, "rb"))==NULL)//以二进制只读方式打开要导入的文件{printf("所选文件打开失败!");system("pause");Paint_Start();return;}for (; fgetc(fp) != EOF;)//fp的文件位置往后读一字节看是不是读到EOF了,不是就再退一字节{fseek(fp,-1L,1);//fp位置退一字节fread(&stu, 240, 1, fp);fwrite(&stu, 240, 1, fpp);}printf("导入完成!");system("pause");fcloseall();Paint_Start();
}
void list()//排序查看
{FILE* fp;student stu;student* _stu = (student*) malloc(240 * 50);//临时数组用于储存读取的所有人数据,用来排序而不改变文件内容int num, i;fp = fopen("stu.db", "rb");//只读system("cls");printf("*****************************************************排序输出***********************************************************\n");printf("选择排序的选项,综合成绩(输入1),实得学分(输入2),按Enter键确认:\n");if (fp == NULL){printf("数据文件打开失败!\n");system("pause");Paint_Start();return;}for (i = 0; fgetc(fp) != EOF; i++)//计算学生数量{fseek(fp, -1L, 1);if (fread(&_stu[i], 240, 1, fp) != 1){printf("数据读取失败!\n");system("pause");fclose(fp);Paint_Start();return;}}for (int j=0; j<i;j++)//计算每个同学的平均成绩{_stu[j].sco.overal_aver = (_stu[j].sco.ch.overal + _stu[j].sco.ma.overal + _stu[j].sco.en.overal + _stu[j].sco.pe.overal + _stu[j].sco.se.overal) / 5.0;//平均综合成绩_stu[j].sco.credit_aver = (_stu[j].sco.ch.real_credit + _stu[j].sco.ma.real_credit + _stu[j].sco.en.real_credit + _stu[j].sco.pe.real_credit + _stu[j].sco.se.real_credit) / 5.0;//平均综合学分}scanf("%d", &num);while (getchar() != '\n')continue;if (num == 1)//按平均综合成绩排序{for (int j = 0; j < i - 1; j++)//起泡法排序{for (int k = 0; k < i - 1 - j; k++){if (_stu[k].sco.overal_aver < _stu[k + 1].sco.overal_aver){student temp = _stu[k + 1];_stu[k + 1] = _stu[k];_stu[k] = temp;}}}printf("以下为各个学生信息和学生的各科综合成绩、平均综合成绩:\n\n");printf("************************************************************************\n");printf("* 学号           姓名      语文   数学   英语   体育   专业   平均综合 *\n");for (int j = 0; j < i; j++){printf("* %-15s%-10s%-7.1f%-7.1f%-7.1f%-7.1f%-7.1f%-9.2f*\n", _stu[j].basic.id, _stu[j].basic.name, _stu[j].sco.ch.overal, _stu[j].sco.ma.overal, _stu[j].sco.en.overal, _stu[j].sco.pe.overal, _stu[j].sco.se.overal,_stu[j].sco.overal_aver);}printf("************************************************************************\n");}else if (num == 2)//按平均实得学分排序{for (int j = 0; j < i - 1; j++)//起泡法排序{for (int k = 0; k < i - 1 - j; k++){if (_stu[k].sco.credit_aver < _stu[k + 1].sco.credit_aver){student temp = _stu[k + 1];_stu[k + 1] = _stu[k];_stu[k] = temp;}}}printf("以下为各个学生信息和学生的各科实得学分、平均实得学分:\n\n");printf("************************************************************************\n");printf("* 学号           姓名      语文   数学   英语   体育   专业   平均实得 *\n");for (int j = 0; j < i; j++){printf("* %-15s%-10s%-7.1f%-7.1f%-7.1f%-7.1f%-7.1f%-9.2f*\n", _stu[j].basic.id, _stu[j].basic.name,_stu[j].sco.ch.real_credit, _stu[j].sco.ma.real_credit, _stu[j].sco.en.real_credit, _stu[j].sco.pe.real_credit, _stu[j].sco.se.real_credit,_stu[j].sco.credit_aver);}printf("************************************************************************\n");}else{printf("二选一!");system("pause");Paint_Start();}free(_stu);//释放内存fcloseall();system("pause");Paint_Start();
}
//查询信息
void find_info()
{student stu;int num;char item[30]="";//用于储存姓名或者学号 跟数据库条目对比FILE* fp;fp = fopen("stu.db", "rb");//只读if (fp == NULL){printf("数据库打开失败!\n");system("pause");Paint_Start();return;}printf("请选择查找方式,通过学号/姓名(输入1),宿舍号码(输入2)查找,按Enter键确认:\n");scanf("%d",&num);//选择查找方式while (getchar() != '\n')continue;if (num == 1)//姓名或学号{printf("选择通过学号(输入1),姓名(输入2)查找,按Enter键确认:\n");scanf("%d",&num);while (getchar() != '\n')continue;if (num == 1)//学号{printf("\t\t\t\t\t\t<键入'#'并回车退出>\n");int exist;while (1){exist = 0;printf("输入学号:");scanf("%s", item);while (getchar() != '\n')continue;if (item[0] == '#')//#则退出{fclose(fp);Paint_Start();}while (fgetc(fp) != EOF)//遍历{fseek(fp, -1L, 1);fread(&stu, 240, 1, fp);if (strcmp(stu.basic.id, item) == 0)//找到相同项就打印出来{exist = 1;printf("%-15s%-10s%-5s%-10s%-15s\n", "学号", "姓名", "性别", "宿舍号码", "电话号码");printf("%-15s%-10s%-5s%-10s%-15s\n\n", stu.basic.id, stu.basic.name, stu.basic.sex, stu.basic.dom, stu.basic.tel);//break;}}if (exist == 0) printf("查无此人!\n\n");rewind(fp);//关键!!}}else if (num == 2)//姓名{printf("\t\t\t\t\t\t<键入'#'并回车退出>\n");int exist;char item[10]="";while (1){exist = 0;printf("输入姓名:");scanf("%s", item);while (getchar() != '\n')continue;if (item[0] == '#')//#则退出{fcloseall();break;}while (fgetc(fp) != EOF)//遍历{fseek(fp, -1L, 1);fread(&stu, 240, 1, fp);if (strcmp(stu.basic.name, item) == 0)//找到相同项就打印出来{exist = 1;printf("%-15s%-10s%-5s%-10s%-15s\n", "学号", "姓名", "性别", "宿舍号码", "电话号码");printf("%-15s%-10s%-5s%-10s%-15s\n\n", stu.basic.id, stu.basic.name, stu.basic.sex, stu.basic.dom, stu.basic.tel);break;}}if (exist == 0) printf("查无此人!\n\n");rewind(fp);//关键!!}}else{printf("二选一!\n");system("pause");Paint_Start();}fcloseall();Paint_Start();}else{if (num == 2)//宿舍号码{char item[5] = "";fp = fopen("stu.db", "rb");if (fp == NULL){printf("数据库打开失败!\n");system("pause");Paint_Start();return;}int exist;printf("\t\t\t\t\t\t<键入'#'并回车退出>\n");while (1){exist = 0;printf("宿舍号码:");scanf("%s",item);while (getchar() != '\n')continue;if (item[0] == '#')//#则退出{fcloseall();//奇怪的问题,fclose无法关闭文件流,只有fcloseall可以break;}printf("%-15s%-10s%-5s%-10s%-15s\n", "学号", "姓名", "性别", "宿舍号码", "电话号码");while (fgetc(fp)!=EOF){fseek(fp,-1L,1);fread(&stu,240,1,fp);if (strcmp(stu.basic.dom, item) == 0){exist = 1;printf("%-15s%-10s%-5s%-10s%-15s\n", stu.basic.id, stu.basic.name, stu.basic.sex, stu.basic.dom, stu.basic.tel);}}if (exist == 0) printf("找不到这个宿舍的人!\n\n");else printf("\n");rewind(fp);//这个很关键!!}}else{printf("二选一噢~\n");//如果既没输1也没输2就打印它system("pause");}}fcloseall();Paint_Start();
}
//成绩查询
void find_score()
{student stu;int num;char item[30] = "";//用于储存姓名或者学号 跟数据库条目对比FILE* fp;fp = fopen("stu.db", "rb");if (fp == NULL){printf("数据库打开失败!\n");system("pause");Paint_Start();return;}printf("选择通过学号(输入1),姓名(输入2)查找,按Enter键确认:\n");scanf("%d", &num);while (getchar() != '\n')continue;if (num == 1)//学号{printf("\t\t\t\t\t\t<键入'#'并回车退出>\n");int exist;while (1){exist = 0;printf("输入学号:");scanf("%s", item);while (getchar() != '\n')continue;if (item[0] == '#')//#则退出{fcloseall();Paint_Start();return;}printf("***********************************************************************************************************************\n");while (fgetc(fp) != EOF)//遍历{fseek(fp, -1L, 1);fread(&stu, 240, 1, fp);if (strcmp(stu.basic.id, item) == 0)//找到相同项就打印出来{exist = 1;int n = 0;float finalcredit = 0;printf("学号:%-15s姓名:%-s\n\n", stu.basic.id, stu.basic.name);if (stu.sco.ch.has){printf("课程编号:A    课程名称:语文    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.ch.overal, stu.sco.ch.real_credit); n++;finalcredit = finalcredit + stu.sco.ch.real_credit;}if (stu.sco.ma.has){printf("课程编号:B    课程名称:数学    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.ma.overal, stu.sco.ma.real_credit); n++;finalcredit = finalcredit + stu.sco.ma.real_credit;}if (stu.sco.en.has){printf("课程编号:C    课程名称:英语    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.en.overal, stu.sco.en.real_credit); n++;finalcredit = finalcredit + stu.sco.en.real_credit;}if (stu.sco.pe.has){printf("课程编号:D    课程名称:体育    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.pe.overal, stu.sco.pe.real_credit); n++;finalcredit = finalcredit + stu.sco.pe.real_credit;}if (stu.sco.se.has){printf("课程编号:E    课程名称:专业    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.se.overal, stu.sco.se.real_credit); n++;finalcredit = finalcredit + stu.sco.se.real_credit;}if ((stu.sco.ch.has) || (stu.sco.ma.has) || (stu.sco.en.has) || (stu.sco.pe.has) || (stu.sco.se.has))printf("\n\t\t\t\t  共修:%d科   实得总学分为:%.2f\n\n", n, finalcredit);else printf("无成绩!\n\n");break;}}if (exist == 0) printf("查无此人!\n");printf("***********************************************************************************************************************\n");rewind(fp);//关键!!}}else if (num == 2)//姓名{printf("\t\t\t\t\t\t<键入'#'并回车退出>\n");int exist;char item[10] = "";while (1){exist = 0;printf("输入姓名:");scanf("%s", item);while (getchar() != '\n')continue;if (item[0] == '#')//#则退出{fcloseall();Paint_Start();return;}printf("***********************************************************************************************************************\n");while (fgetc(fp) != EOF)//遍历{fseek(fp, -1L, 1);fread(&stu, 240, 1, fp);if (strcmp(stu.basic.name, item) == 0)//找到相同项就打印出来{exist = 1;int n=0;float finalcredit=0;printf("学号:%-15s姓名:%-s\n\n", stu.basic.id, stu.basic.name);if (stu.sco.ch.has){printf("课程编号:A    课程名称:语文    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.ch.overal, stu.sco.ch.real_credit); n++;finalcredit = finalcredit + stu.sco.ch.real_credit;}if (stu.sco.ma.has){printf("课程编号:B    课程名称:数学    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.ma.overal, stu.sco.ma.real_credit); n++;finalcredit = finalcredit + stu.sco.ma.real_credit;}if (stu.sco.en.has){printf("课程编号:C    课程名称:英语    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.en.overal, stu.sco.en.real_credit); n++;finalcredit = finalcredit + stu.sco.en.real_credit;}if (stu.sco.pe.has){printf("课程编号:D    课程名称:体育    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.pe.overal, stu.sco.pe.real_credit); n++;finalcredit = finalcredit + stu.sco.pe.real_credit;}if (stu.sco.se.has){printf("课程编号:E    课程名称:专业    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.se.overal, stu.sco.se.real_credit); n++;finalcredit = finalcredit + stu.sco.se.real_credit;}if ((stu.sco.ch.has) || (stu.sco.ma.has) || (stu.sco.en.has) || (stu.sco.pe.has) || (stu.sco.se.has))printf("\n\t\t\t\t  共修:%d科   实得总学分为:%.2f\n\n", n, finalcredit);else printf("无成绩!\n\n");break;}}if (exist == 0) printf("查无此人!\n");printf("***********************************************************************************************************************\n");rewind(fp);//关键!!}}else{printf("二选一!\n");system("pause");fcloseall();Paint_Start();}fcloseall();
}
//数据删除
void del()//删除成绩 
{FILE* fp, * fpp;student stu;char id[30] = "";int i;printf("**********************************************输入'#'并回车可退出此功能************************************************\n");while (1){memset(id, 0, 30);fpp = fopen("stutemp.db", "wb");//临时新建的文件,用于储存删除一个人后所以人的数据,然后把他变成stu.db,把原来的stu.db删除,起到删除一个人数据而不留空的目的fcloseall();if ((fp = fopen("stu.db", "rb+")) == NULL){printf("文件打开失败!\n");system("pause");Paint_Start();return;}if ((fpp = fopen("stutemp.db", "rb+")) == NULL){printf("临时文件创建失败!\n");system("pause");return;}printf("输入目标学号:");//姓名会重,学号不会重		//先查找再删除scanf("%s", id);while (getchar() != '\n')continue;if (id[0] == '#'){break;}int done = 0;for (i = 1; fgetc(fp) != EOF; i++)//与id相同的第i个数据{fseek(fp, -1L, 1);fread(&stu, 240, 1, fp);if (strcmp(id, stu.basic.id) == 0){done = 1;break;}}rewind(fp);rewind(fpp);if (done == 1)//存在此人则输出信息{printf("\n以下为该学生成绩和基本信息:\n");printf("%-15s%-10s%-5s%-10s%-15s\n", "学号", "姓名", "性别", "宿舍号码", "电话号码");printf("%-15s%-10s%-5s%-10s%-15s\n", stu.basic.id, stu.basic.name, stu.basic.sex, stu.basic.dom, stu.basic.tel);int n = 0;float finalcredit = 0;printf("学生成绩:\n");if (stu.sco.ch.has){printf("课程编号:A    课程名称:语文    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.ch.overal, stu.sco.ch.real_credit); n++;finalcredit = finalcredit + stu.sco.ch.real_credit;}if (stu.sco.ma.has){printf("课程编号:B    课程名称:数学    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.ma.overal, stu.sco.ma.real_credit); n++;finalcredit = finalcredit + stu.sco.ma.real_credit;}if (stu.sco.en.has){printf("课程编号:C    课程名称:英语    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.en.overal, stu.sco.en.real_credit); n++;finalcredit = finalcredit + stu.sco.en.real_credit;}if (stu.sco.pe.has){printf("课程编号:D    课程名称:体育    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.pe.overal, stu.sco.pe.real_credit); n++;finalcredit = finalcredit + stu.sco.pe.real_credit;}if (stu.sco.se.has){printf("课程编号:E    课程名称:专业    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.se.overal, stu.sco.se.real_credit); n++;finalcredit = finalcredit + stu.sco.se.real_credit;}printf("\n\t\t\t\t   共修:%d科   实得总学分为:%.2f\n\n", n, finalcredit);printf("\n请确认是否要删除该学生全部数据?(输入:'y'删除,'n'取消)\n");printf(">>");scanf("%s", id);while (getchar() != '\n')continue;if (id[0] == 'y'){for (int j = 1; fgetc(fp) != EOF; j++)//把stu里的每一条数据,除了i标记的那条(也就是要删除的那条),都写入临时文件{fseek(fp, -1L, 1);if (j == i){fseek(fp, 240L, 1);if (fgetc(fp) == EOF)break;else fseek(fp, -1L, 1);}fread(&stu, 240, 1, fp);if (fwrite(&stu, 240, 1, fpp) != 1){printf("写入临时文件失败!\n");done = 0;}}fcloseall();system("del stu.db");//命令提示符多方便system("rename stutemp.db stu.db");//删了stu.db拿stutemp.db充当stu.dbif (done == 0)printf("删除失败!\n\n");else printf("数据已删除!\n");printf("***********************************************************************************************************************\n");}else{if (id[0] == 'n')printf("已取消!\n\n");else{printf("未知指令!\n\n");}printf("***********************************************************************************************************************\n");}}else{printf("查无此人!\n\n");printf("***********************************************************************************************************************\n");}fcloseall();}fcloseall();Paint_Start();
} 
//成绩分段
void div()//成绩分段
{system("cls");printf("******************************************************成绩分段**********************************************************\n");printf("根据平均综合成绩可将学生分为A,B,C三个档次:\n");printf("\t\t\t\t\t\t      ***A***\n\n");FILE* fp;int i, j;student stu;if ((fp = fopen("stu.db", "rb")) == NULL){printf("文件打开失败!\n");return;}printf("\t\t\t学号           姓名      语文   数学   英语   体育   专业   平均综合\n");for (;fgetc(fp)!=EOF;)//一条条判断是不是在某范围内,在,则打印{fseek(fp,-1L,1);fread(&stu,240,1,fp);stu.sco.overal_aver = (stu.sco.ch.overal + stu.sco.ma.overal + stu.sco.en.overal + stu.sco.pe.overal + stu.sco.se.overal) / 5.0;//平均综合成绩if (stu.sco.overal_aver >= 80)printf("\t\t\t%-15s%-10s%-7.1f%-7.1f%-7.1f%-7.1f%-7.1f%-10.2f\n", stu.basic.id, stu.basic.name, stu.sco.ch.overal, stu.sco.ma.overal, stu.sco.en.overal, stu.sco.pe.overal, stu.sco.se.overal, stu.sco.overal_aver);}rewind(fp);printf("\n\n\t\t\t\t\t\t       **B**\n\n");printf("\t\t\t学号           姓名      语文   数学   英语   体育   专业   平均综合\n");for (; fgetc(fp) != EOF;){fseek(fp, -1L, 1);fread(&stu, 240, 1, fp);stu.sco.overal_aver = (stu.sco.ch.overal + stu.sco.ma.overal + stu.sco.en.overal + stu.sco.pe.overal + stu.sco.se.overal) / 5.0;//平均综合成绩if (stu.sco.overal_aver < 80&&stu.sco.overal_aver>=60)printf("\t\t\t%-15s%-10s%-7.1f%-7.1f%-7.1f%-7.1f%-7.1f%-10.2f\n", stu.basic.id, stu.basic.name, stu.sco.ch.overal, stu.sco.ma.overal, stu.sco.en.overal, stu.sco.pe.overal, stu.sco.se.overal, stu.sco.overal_aver);}rewind(fp);printf("\n\n\t\t\t\t\t\t        *C*\n\n");printf("\t\t\t学号           姓名      语文   数学   英语   体育   专业   平均综合\n");for (; fgetc(fp) != EOF;){fseek(fp, -1L, 1);fread(&stu, 240, 1, fp);stu.sco.overal_aver = (stu.sco.ch.overal + stu.sco.ma.overal + stu.sco.en.overal + stu.sco.pe.overal + stu.sco.se.overal) / 5.0;//平均综合成绩if (stu.sco.overal_aver < 60)printf("\t\t\t%-15s%-10s%-7.1f%-7.1f%-7.1f%-7.1f%-7.1f%-10.2f\n", stu.basic.id, stu.basic.name, stu.sco.ch.overal, stu.sco.ma.overal, stu.sco.en.overal, stu.sco.pe.overal, stu.sco.se.overal, stu.sco.overal_aver);}fcloseall();printf("\n\t\t\t\t\t\t\t\t\t      ");system("pause");Paint_Start();return;
}
//文件输出
void outfile()//输出文件内容 
{char dir[50]="";float total;FILE* fp;student stu;system("cls");printf("*****************************************************文件输出***********************************************************\n");printf("输入文件的绝对路径(例如C:\\xxxxx.db):\n");scanf("%s", dir);while (getchar() != '\n')continue;if ((fp = fopen(dir, "rb")) == NULL){printf("文件打开失败!");system("pause");Paint_Start();return;}printf("****************************************************************************\n");printf("* 学号           姓名      性别 宿舍号 电话号    平均综合成绩 平均综合学分 *\n");for (; fgetc(fp) != EOF;){fseek(fp, -1L, SEEK_CUR);fread(&stu, 240, 1, fp);stu.sco.overal_aver = (stu.sco.ch.overal + stu.sco.ma.overal + stu.sco.en.overal + stu.sco.pe.overal + stu.sco.se.overal) / 5.0;//平均综合成绩stu.sco.credit_aver = (stu.sco.ch.real_credit + stu.sco.ma.real_credit + stu.sco.en.real_credit + stu.sco.pe.real_credit + stu.sco.se.real_credit) / 5.0;//平均综合学分printf("* %-15s%-10s%-5s%-7s%-10s%-13f%-13f*\n", stu.basic.id,stu.basic.name,stu.basic.sex,stu.basic.dom,stu.basic.tel,stu.sco.overal_aver,stu.sco.credit_aver);}printf("****************************************************************************\n");fcloseall();printf("\n\t\t\t\t\t\t              ");system("pause");Paint_Start();
}
//假的文件储存
void savefile()//文件储存
{printf("文件stu.db已储存到源程序根目录!");system("pause");Paint_Start();
}
//成绩追加
void add()//追加,在文件末尾
{system("cls");printf("*****************************************************成绩追加***********************************************************\n");printf("依次键入学号、姓名、性别、宿舍号码、电话号码,用一个空格隔开各数据,回车键确认。样例:541913460230 喵辰汐 男 113 10086\n");FILE* fp;student stu;bool err = false;char id[30], name[10], sex[5] = "", dom[5], tel[20];char  subid[5], subname[10], daily[5], credit[5], experi[5], paper[5];fp = fopen("stu.db", "rb+");if (fp == NULL){printf("文件打开失败!\n");Paint_Start();return;}memset(id, 0, 30);memset(name, 0, 10);memset(sex, 0, 5);memset(dom, 0, 5);memset(tel, 0, 20);printf("输入:");scanf("%s %s %s %s %s",id, name, sex, dom, tel);while (getchar() != '\n')continue;bool isname = true;for (int i = 0; i <= 7; i++){if (name[i] >= 32 && name[i] <= 127) isname = false;//仅判断是否是ASCII中的字符}if (name[8] == '\0' && isname == true)//一个中文字符占两个字节{strcpy(stu.basic.name, name);}else{printf("请检查姓名输入是否正确,并重新输入!\n");err = true;}if (ifnum(id) && id[11] != '\0' && id[12] == '\0') strcpy(stu.basic.id, id);else{printf("请检查学号输入是否正确,并重新输入!\n");err = true;}if (strcmp(sex, "男") == 0 || strcmp(sex, "女") == 0) strcpy(stu.basic.sex, sex);else{printf("请检查性别输入是否正确,并重新输入!\n");err = true;}if (ifnum(dom)) strcpy(stu.basic.dom, dom);else{printf("请检查宿舍号码输入是否正确,并重新输入!\n");err = true;}if (ifnum(tel)) strcpy(stu.basic.tel, tel);else{printf("请检查电话号码输入是否正确,并重新输入!\n");err = true;}if (err == false){int exist = 0;student _stu = stu;while (fgetc(fp) != EOF)//遍历{fseek(fp, -1L, 1);fread(&_stu, 240, 1, fp);if (strcmp(_stu.basic.id, id) == 0)//找到相同项{exist = 1;printf("已有此人!\n");system("pause"); fcloseall();Paint_Start();return;}}if (exist == 0)//文件指针已在末尾{printf("***********************************************************************************************************************\n");printf("依次输入课程编号(A-E)、课程名称(编号为准)、学分、平时成绩、实验成绩、卷面成绩,用一个空格隔开各数据,回车键确认(输入'#'键并回车结束输入)。\n例如:A 语文 3 66 78 82\n");printf("输入:\n");while (err == false){scanf("%s", subid);if (subid[0] == '#'){//此处绝对不能关闭文件流,下面将要写入文件break;}scanf(" %s %s %s %s %s", subname, credit, daily, experi, paper);while (getchar() != '\n')continue;if (subid[0] >= 'A' && subid[0] <= 'E' && subid[1] == '\0');else{printf("请检查课程编号输入是否正确,并重新输入!\n");err = true;}if (ifnum(credit));else{printf("请检查学分输入是否正确,并重新输入!\n");err = true;}if (ifnum(daily) && ((daily[0] == '1' && daily[1] == '0' && daily[2] == '0') || (daily[2] == '\0' && daily[3] != '\0') || daily[2] == '\0'));else{printf("请检查平时成绩输入是否正确,并重新输入!\n");err = true;}if (ifnum(experi) && ((experi[0] == '1' && experi[1] == '0' && experi[2] == '0') || (experi[2] == '\0' && experi[3] != '\0') || experi[2] == '\0'));else{printf("请检查实验成绩输入是否正确,并重新输入!\n");err = true;}if (ifnum(paper) && ((paper[0] == '1' && paper[1] == '0' && paper[2] == '0') || (paper[2] == '\0' && paper[3] != '\0') || paper[2] == '\0'));else{printf("请检查卷面成绩输入是否正确,并重新输入!\n");err = true;}switch (subid[0])//各项成绩信息计算并存入stu结构体{case 'A':{stu.sco.ch.has = true;strcpy(stu.sco.ch.credit, credit);strcpy(stu.sco.ch.daily, daily);strcpy(stu.sco.ch.experi, experi);strcpy(stu.sco.ch.paper, paper);float credittemp;if (credit[2] == '0') credittemp = 100;else if (credit[1] != '\0')credittemp = ((int)credit[0] - 48) * 10 + (int)credit[1] - 48;else credittemp = (int)credit[0] - 48;float dailytemp, papertemp, experitemp;if (daily[2] == '0') dailytemp = 100;else if (daily[1] != '\0')dailytemp = ((int)daily[0] - 48) * 10 + (int)daily[1] - 48;else dailytemp = (int)daily[0] - 48;if (paper[2] == '0') papertemp = 100;else if (paper[1] != '\0')papertemp = ((int)paper[0] - 48) * 10 + (int)paper[1] - 48;else papertemp = (int)paper[0] - 48;if (strcmp(experi, "-1") == 0){stu.sco.ch.overal = dailytemp * 0.3 + papertemp * 0.7;}else{if (experi[2] == '0') experitemp = 100;else if (experi[1] != '\0')experitemp = ((int)experi[0] - 48) * 10 + (int)experi[1] - 48;else experitemp = (int)experi[0] - 48;stu.sco.ch.overal = dailytemp * 0.15 + experitemp * 0.15 + papertemp * 0.7;}if (stu.sco.ch.overal >= 90 && stu.sco.ch.overal <= 100)stu.sco.ch.real_credit = credittemp;else if (stu.sco.ch.overal < 90 && stu.sco.ch.overal >= 80) stu.sco.ch.real_credit = credittemp * 0.8;else if (stu.sco.ch.overal < 80 && stu.sco.ch.overal >= 70) stu.sco.ch.real_credit = credittemp * 0.75;else if (stu.sco.ch.overal < 70 && stu.sco.ch.overal >= 60) stu.sco.ch.real_credit = credittemp * 0.6;else stu.sco.ch.real_credit = 0;}; break;case 'B':{stu.sco.ma.has = true;strcpy(stu.sco.ma.credit, credit);strcpy(stu.sco.ma.daily, daily);strcpy(stu.sco.ma.experi, experi);strcpy(stu.sco.ma.paper, paper);float credittemp;if (credit[2] == '0') credittemp = 100;else if (credit[1] != '\0')credittemp = ((int)credit[0] - 48) * 10 + (int)credit[1] - 48;else credittemp = (int)credit[0] - 48;float dailytemp, papertemp, experitemp;if (daily[2] == '0') dailytemp = 100;else if (daily[1] != '\0')dailytemp = ((int)daily[0] - 48) * 10 + (int)daily[1] - 48;else dailytemp = (int)daily[0] - 48;if (paper[2] == '0') papertemp = 100;else if (paper[1] != '\0')papertemp = ((int)paper[0] - 48) * 10 + (int)paper[1] - 48;else papertemp = (int)paper[0] - 48;if (strcmp(experi, "-1") == 0){stu.sco.ma.overal = dailytemp * 0.3 + papertemp * 0.7;}else{if (experi[2] == '0') experitemp = 100;else if (experi[1] != '\0')experitemp = ((int)experi[0] - 48) * 10 + (int)experi[1] - 48;else experitemp = (int)experi[0] - 48;stu.sco.ma.overal = dailytemp * 0.15 + experitemp * 0.15 + papertemp * 0.7;}if (stu.sco.ma.overal >= 90 && stu.sco.ma.overal <= 100)stu.sco.ma.real_credit = credittemp;else if (stu.sco.ma.overal < 90 && stu.sco.ma.overal >= 80) stu.sco.ma.real_credit = credittemp * 0.8;else if (stu.sco.ma.overal < 80 && stu.sco.ma.overal >= 70) stu.sco.ma.real_credit = credittemp * 0.75;else if (stu.sco.ma.overal < 70 && stu.sco.ma.overal >= 60) stu.sco.ma.real_credit = credittemp * 0.6;else stu.sco.ma.real_credit = 0;}; break;case 'C':{stu.sco.en.has = true;strcpy(stu.sco.en.credit, credit);strcpy(stu.sco.en.daily, daily);strcpy(stu.sco.en.experi, experi);strcpy(stu.sco.en.paper, paper);float credittemp;if (credit[2] == '0') credittemp = 100;else if (credit[1] != '\0')credittemp = ((int)credit[0] - 48) * 10 + (int)credit[1] - 48;else credittemp = (int)credit[0] - 48;float dailytemp, papertemp, experitemp;if (daily[2] == '0') dailytemp = 100;else if (daily[1] != '\0')dailytemp = ((int)daily[0] - 48) * 10 + (int)daily[1] - 48;else dailytemp = (int)daily[0] - 48;if (paper[2] == '0') papertemp = 100;else if (paper[1] != '\0')papertemp = ((int)paper[0] - 48) * 10 + (int)paper[1] - 48;else papertemp = (int)paper[0] - 48;if (strcmp(experi, "-1") == 0){stu.sco.en.overal = dailytemp * 0.3 + papertemp * 0.7;}else{if (experi[2] == '0') experitemp = 100;else if (experi[1] != '\0')experitemp = ((int)experi[0] - 48) * 10 + (int)experi[1] - 48;else experitemp = (int)experi[0] - 48;stu.sco.en.overal = dailytemp * 0.15 + experitemp * 0.15 + papertemp * 0.7;}if (stu.sco.en.overal >= 90 && stu.sco.en.overal <= 100)stu.sco.en.real_credit = credittemp;else if (stu.sco.en.overal < 90 && stu.sco.en.overal >= 80) stu.sco.en.real_credit = credittemp * 0.8;else if (stu.sco.en.overal < 80 && stu.sco.en.overal >= 70) stu.sco.en.real_credit = credittemp * 0.75;else if (stu.sco.en.overal < 70 && stu.sco.en.overal >= 60) stu.sco.en.real_credit = credittemp * 0.6;else stu.sco.en.real_credit = 0;}; break;case 'D':{stu.sco.pe.has = true;strcpy(stu.sco.pe.credit, credit);strcpy(stu.sco.pe.daily, daily);strcpy(stu.sco.pe.experi, experi);strcpy(stu.sco.pe.paper, paper);float credittemp;if (credit[2] == '0') credittemp = 100;else if (credit[1] != '\0')credittemp = ((int)credit[0] - 48) * 10 + (int)credit[1] - 48;else credittemp = (int)credit[0] - 48;float dailytemp, papertemp, experitemp;if (daily[2] == '0') dailytemp = 100;else if (daily[1] != '\0')dailytemp = ((int)daily[0] - 48) * 10 + (int)daily[1] - 48;else dailytemp = (int)daily[0] - 48;if (paper[2] == '0') papertemp = 100;else if (paper[1] != '\0')papertemp = ((int)paper[0] - 48) * 10 + (int)paper[1] - 48;else papertemp = (int)paper[0] - 48;if (strcmp(experi, "-1") == 0){stu.sco.pe.overal = dailytemp * 0.3 + papertemp * 0.7;}else{if (experi[2] == '0') experitemp = 100;else if (experi[1] != '\0')experitemp = ((int)experi[0] - 48) * 10 + (int)experi[1] - 48;else experitemp = (int)experi[0] - 48;stu.sco.pe.overal = dailytemp * 0.15 + experitemp * 0.15 + papertemp * 0.7;}if (stu.sco.pe.overal >= 90 && stu.sco.pe.overal <= 100)stu.sco.pe.real_credit = credittemp;else if (stu.sco.pe.overal < 90 && stu.sco.pe.overal >= 80) stu.sco.pe.real_credit = credittemp * 0.8;else if (stu.sco.pe.overal < 80 && stu.sco.pe.overal >= 70) stu.sco.pe.real_credit = credittemp * 0.75;else if (stu.sco.pe.overal < 70 && stu.sco.pe.overal >= 60) stu.sco.pe.real_credit = credittemp * 0.6;else stu.sco.pe.real_credit = 0;}; break;case 'E':{stu.sco.se.has = true;strcpy(stu.sco.se.credit, credit);strcpy(stu.sco.se.daily, daily);strcpy(stu.sco.se.experi, experi);strcpy(stu.sco.se.paper, paper);float credittemp;if (credit[2] == '0') credittemp = 100;else if (credit[1] != '\0')credittemp = ((int)credit[0] - 48) * 10 + (int)credit[1] - 48;else credittemp = (int)credit[0] - 48;float dailytemp, papertemp, experitemp;if (daily[2] == '0') dailytemp = 100;else if (daily[1] != '\0')dailytemp = ((int)daily[0] - 48) * 10 + (int)daily[1] - 48;else dailytemp = (int)daily[0] - 48;if (paper[2] == '0') papertemp = 100;else if (paper[1] != '\0')papertemp = ((int)paper[0] - 48) * 10 + (int)paper[1] - 48;else papertemp = (int)paper[0] - 48;if (strcmp(experi, "-1") == 0){stu.sco.se.overal = dailytemp * 0.3 + papertemp * 0.7;}else{if (experi[2] == '0') experitemp = 100;else if (experi[1] != '\0')experitemp = ((int)experi[0] - 48) * 10 + (int)experi[1] - 48;else experitemp = (int)experi[0] - 48;stu.sco.se.overal = dailytemp * 0.15 + experitemp * 0.15 + papertemp * 0.7;}if (stu.sco.se.overal >= 90 && stu.sco.se.overal <= 100)stu.sco.se.real_credit = credittemp;else if (stu.sco.se.overal < 90 && stu.sco.se.overal >= 80) stu.sco.se.real_credit = credittemp * 0.8;else if (stu.sco.se.overal < 80 && stu.sco.se.overal >= 70) stu.sco.se.real_credit = credittemp * 0.75;else if (stu.sco.se.overal < 70 && stu.sco.se.overal >= 60) stu.sco.se.real_credit = credittemp * 0.6;else stu.sco.se.real_credit = 0;}//已经全部存入stu}}fwrite(&stu, 240, 1, fp);fcloseall();printf("***********************************************************************************************************************\n");printf("以下是新增学生基本信息:\n");printf("%-15s%-10s%-5s%-10s%-15s\n", "学号", "姓名", "性别", "宿舍号码", "电话号码");printf("%-15s%-10s%-5s%-10s%-15s\n", stu.basic.id, stu.basic.name, stu.basic.sex, stu.basic.dom, stu.basic.tel);printf("\n以下是新增学生成绩:\n");int n = 0;float finalcredit = 0;printf("\n学号:%-15s姓名:%-s\n\n", stu.basic.id, stu.basic.name);if (stu.sco.ch.has){printf("课程编号:A    课程名称:语文    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.ch.overal, stu.sco.ch.real_credit); n++;finalcredit = finalcredit + stu.sco.ch.real_credit;}if (stu.sco.ma.has){printf("课程编号:B    课程名称:数学    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.ma.overal, stu.sco.ma.real_credit); n++;finalcredit = finalcredit + stu.sco.ma.real_credit;}if (stu.sco.en.has){printf("课程编号:C    课程名称:英语    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.en.overal, stu.sco.en.real_credit); n++;finalcredit = finalcredit + stu.sco.en.real_credit;}if (stu.sco.pe.has){printf("课程编号:D    课程名称:体育    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.pe.overal, stu.sco.pe.real_credit); n++;finalcredit = finalcredit + stu.sco.pe.real_credit;}if (stu.sco.se.has){printf("课程编号:E    课程名称:专业    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.se.overal, stu.sco.se.real_credit); n++;finalcredit = finalcredit + stu.sco.se.real_credit;}printf("\n\t\t\t\t   共修:%d科   实得总学分为:%.2f\n\n", n, finalcredit);system("pause");Paint_Start();}}if (fp != NULL)fcloseall();system("pause");Paint_Start();
}
//成绩修改
void edit()//先查找,再编辑
{student stu;int exist;bool err;char id[30], subid[5], subname[10], daily[5], credit[5], experi[5], paper[5];char item[30] = "";FILE* fp;printf("\t\t\t\t\t\t<键入'#'并回车退出>\n");fp = fopen("stu.db", "rb+");if (fp == NULL){printf("数据库打开失败!\n");system("pause");Paint_Start();return;}while (1){exist = 0;printf("学号:");scanf("%s", item);while (getchar() != '\n')continue;if (item[0] == '#')break;printf("***********************************************************************************************************************\n");while (fgetc(fp) != EOF)//先查人{fseek(fp, -1L, 1);fread(&stu, 240, 1, fp);//先读取,再一个个比较,直到读到底都没有一样的就直接结束了,或者读到一样的就输出到屏幕,然后开始读取学生信息和成绩,输入成绩,仅(替换)录入成绩if (strcmp(stu.basic.id, item) == 0){exist = 1;int n = 0;float finalcredit = 0;printf("学号:%-15s姓名:%-s\n\n", stu.basic.id, stu.basic.name);if (stu.sco.ch.has){printf("课程编号:A    课程名称:语文    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.ch.overal, stu.sco.ch.real_credit); n++;finalcredit = finalcredit + stu.sco.ch.real_credit;}if (stu.sco.ma.has){printf("课程编号:B    课程名称:数学    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.ma.overal, stu.sco.ma.real_credit); n++;finalcredit = finalcredit + stu.sco.ma.real_credit;}if (stu.sco.en.has){printf("课程编号:C    课程名称:英语    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.en.overal, stu.sco.en.real_credit); n++;finalcredit = finalcredit + stu.sco.en.real_credit;}if (stu.sco.pe.has){printf("课程编号:D    课程名称:体育    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.pe.overal, stu.sco.pe.real_credit); n++;finalcredit = finalcredit + stu.sco.pe.real_credit;}if (stu.sco.se.has){printf("课程编号:E    课程名称:专业    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.se.overal, stu.sco.se.real_credit); n++;finalcredit = finalcredit + stu.sco.se.real_credit;}printf("\n\t\t\t\t   共修:%d科   实得总学分为:%.2f\n\n", n, finalcredit);printf("***********************************************************************************************************************\n");break;}}if (exist == 0){printf("查无此人!\n");}else//人存在,成绩也存在{err = false;//是否有错误memset(id, 0, 30);//清空各数组所占内存的内容,都变成空,方便后续判断memset(subid, 0, 5);memset(subname, 0, 10);memset(credit, 0, 5);memset(daily, 0, 5);memset(experi, 0, 5);memset(paper, 0, 5);//这样以后,所有元素都变成\0了printf("依次输入课程编号(A-E)、课程名称(以编号为准)、学分、平时成绩、实验成绩、卷面成绩,用一个空格隔开各数据,每一条输入完成后按回车键进行下一条输入。例如:A 语文 3 66 78 82\n输入:");scanf("%s %s %s %s %s %s", subid, subname, credit, daily, experi, paper);while (getchar() != '\n')continue;if (subid[0] >= 'A' && subid[0] <= 'E' && subid[1] == '\0');else{printf("请检查课程编号输入是否正确,并重新输入!\n");err = true;}if (ifnum(credit));else{printf("请检查学分输入是否正确,并重新输入!\n");err = true;}if (ifnum(daily) && ((daily[0] == '1' && daily[1] == '0' && daily[2] == '0') || (daily[2] == '\0' && daily[3] != '\0') || daily[2] == '\0'));else{printf("请检查平时成绩输入是否正确,并重新输入!\n");err = true;}if (ifnum(experi) && ((experi[0] == '1' && experi[1] == '0' && experi[2] == '0') || (experi[2] == '\0' && experi[3] != '\0') || experi[2] == '\0'));else{printf("请检查实验成绩输入是否正确,并重新输入!\n");err = true;}if (ifnum(paper) && ((paper[0] == '1' && paper[1] == '0' && paper[2] == '0') || (paper[2] == '\0' && paper[3] != '\0') || paper[2] == '\0'));else{printf("请检查卷面成绩输入是否正确,并重新输入!\n");err = true;}if (err == false){strcpy(stu.basic.id,item);switch (subid[0]){case 'A':{stu.sco.ch.has = true;strcpy(stu.sco.ch.credit, credit);strcpy(stu.sco.ch.daily, daily);strcpy(stu.sco.ch.experi, experi);strcpy(stu.sco.ch.paper, paper);float credittemp;if (credit[2] == '0') credittemp = 100;else if (credit[1] != '\0')credittemp = ((int)credit[0] - 48) * 10 + (int)credit[1] - 48;else credittemp = (int)credit[0] - 48;float dailytemp, papertemp, experitemp;if (daily[2] == '0') dailytemp = 100;else if (daily[1] != '\0')dailytemp = ((int)daily[0] - 48) * 10 + (int)daily[1] - 48;else dailytemp = (int)daily[0] - 48;if (paper[2] == '0') papertemp = 100;else if (paper[1] != '\0')papertemp = ((int)paper[0] - 48) * 10 + (int)paper[1] - 48;else papertemp = (int)paper[0] - 48;if (strcmp(experi, "-1") == 0){stu.sco.ch.overal = dailytemp * 0.3 + papertemp * 0.7;}else{if (experi[2] == '0') experitemp = 100;else if (experi[1] != '\0')experitemp = ((int)experi[0] - 48) * 10 + (int)experi[1] - 48;else experitemp = (int)experi[0] - 48;stu.sco.ch.overal = dailytemp * 0.15 + experitemp * 0.15 + papertemp * 0.7;}if (stu.sco.ch.overal >= 90 && stu.sco.ch.overal <= 100)stu.sco.ch.real_credit = credittemp;else if (stu.sco.ch.overal < 90 && stu.sco.ch.overal >= 80) stu.sco.ch.real_credit = credittemp * 0.8;else if (stu.sco.ch.overal < 80 && stu.sco.ch.overal >= 70) stu.sco.ch.real_credit = credittemp * 0.75;else if (stu.sco.ch.overal < 70 && stu.sco.ch.overal >= 60) stu.sco.ch.real_credit = credittemp * 0.6;else stu.sco.ch.real_credit = 0;}; break;case 'B':{stu.sco.ma.has = true;strcpy(stu.sco.ma.credit, credit);strcpy(stu.sco.ma.daily, daily);strcpy(stu.sco.ma.experi, experi);strcpy(stu.sco.ma.paper, paper);float credittemp;if (credit[2] == '0') credittemp = 100;else if (credit[1] != '\0')credittemp = ((int)credit[0] - 48) * 10 + (int)credit[1] - 48;else credittemp = (int)credit[0] - 48;float dailytemp, papertemp, experitemp;if (daily[2] == '0') dailytemp = 100;else if (daily[1] != '\0')dailytemp = ((int)daily[0] - 48) * 10 + (int)daily[1] - 48;else dailytemp = (int)daily[0] - 48;if (paper[2] == '0') papertemp = 100;else if (paper[1] != '\0')papertemp = ((int)paper[0] - 48) * 10 + (int)paper[1] - 48;else papertemp = (int)paper[0] - 48;if (strcmp(experi, "-1") == 0){stu.sco.ma.overal = dailytemp * 0.3 + papertemp * 0.7;}else{if (experi[2] == '0') experitemp = 100;else if (experi[1] != '\0')experitemp = ((int)experi[0] - 48) * 10 + (int)experi[1] - 48;else experitemp = (int)experi[0] - 48;stu.sco.ma.overal = dailytemp * 0.15 + experitemp * 0.15 + papertemp * 0.7;}if (stu.sco.ma.overal >= 90 && stu.sco.ma.overal <= 100)stu.sco.ma.real_credit = credittemp;else if (stu.sco.ma.overal < 90 && stu.sco.ma.overal >= 80) stu.sco.ma.real_credit = credittemp * 0.8;else if (stu.sco.ma.overal < 80 && stu.sco.ma.overal >= 70) stu.sco.ma.real_credit = credittemp * 0.75;else if (stu.sco.ma.overal < 70 && stu.sco.ma.overal >= 60) stu.sco.ma.real_credit = credittemp * 0.6;else stu.sco.ma.real_credit = 0;}; break;case 'C':{stu.sco.en.has = true;strcpy(stu.sco.en.credit, credit);strcpy(stu.sco.en.daily, daily);strcpy(stu.sco.en.experi, experi);strcpy(stu.sco.en.paper, paper);float credittemp;if (credit[2] == '0') credittemp = 100;else if (credit[1] != '\0')credittemp = ((int)credit[0] - 48) * 10 + (int)credit[1] - 48;else credittemp = (int)credit[0] - 48;float dailytemp, papertemp, experitemp;if (daily[2] == '0') dailytemp = 100;else if (daily[1] != '\0')dailytemp = ((int)daily[0] - 48) * 10 + (int)daily[1] - 48;else dailytemp = (int)daily[0] - 48;if (paper[2] == '0') papertemp = 100;else if (paper[1] != '\0')papertemp = ((int)paper[0] - 48) * 10 + (int)paper[1] - 48;else papertemp = (int)paper[0] - 48;if (strcmp(experi, "-1") == 0){stu.sco.en.overal = dailytemp * 0.3 + papertemp * 0.7;}else{if (experi[2] == '0') experitemp = 100;else if (experi[1] != '\0')experitemp = ((int)experi[0] - 48) * 10 + (int)experi[1] - 48;else experitemp = (int)experi[0] - 48;stu.sco.en.overal = dailytemp * 0.15 + experitemp * 0.15 + papertemp * 0.7;}if (stu.sco.en.overal >= 90 && stu.sco.en.overal <= 100)stu.sco.en.real_credit = credittemp;else if (stu.sco.en.overal < 90 && stu.sco.en.overal >= 80) stu.sco.en.real_credit = credittemp * 0.8;else if (stu.sco.en.overal < 80 && stu.sco.en.overal >= 70) stu.sco.en.real_credit = credittemp * 0.75;else if (stu.sco.en.overal < 70 && stu.sco.en.overal >= 60) stu.sco.en.real_credit = credittemp * 0.6;else stu.sco.en.real_credit = 0;}; break;case 'D':{stu.sco.pe.has = true;strcpy(stu.sco.pe.credit, credit);strcpy(stu.sco.pe.daily, daily);strcpy(stu.sco.pe.experi, experi);strcpy(stu.sco.pe.paper, paper);float credittemp;if (credit[2] == '0') credittemp = 100;else if (credit[1] != '\0')credittemp = ((int)credit[0] - 48) * 10 + (int)credit[1] - 48;else credittemp = (int)credit[0] - 48;float dailytemp, papertemp, experitemp;if (daily[2] == '0') dailytemp = 100;else if (daily[1] != '\0')dailytemp = ((int)daily[0] - 48) * 10 + (int)daily[1] - 48;else dailytemp = (int)daily[0] - 48;if (paper[2] == '0') papertemp = 100;else if (paper[1] != '\0')papertemp = ((int)paper[0] - 48) * 10 + (int)paper[1] - 48;else papertemp = (int)paper[0] - 48;if (strcmp(experi, "-1") == 0){stu.sco.pe.overal = dailytemp * 0.3 + papertemp * 0.7;}else{if (experi[2] == '0') experitemp = 100;else if (experi[1] != '\0')experitemp = ((int)experi[0] - 48) * 10 + (int)experi[1] - 48;else experitemp = (int)experi[0] - 48;stu.sco.pe.overal = dailytemp * 0.15 + experitemp * 0.15 + papertemp * 0.7;}if (stu.sco.pe.overal >= 90 && stu.sco.pe.overal <= 100)stu.sco.pe.real_credit = credittemp;else if (stu.sco.pe.overal < 90 && stu.sco.pe.overal >= 80) stu.sco.pe.real_credit = credittemp * 0.8;else if (stu.sco.pe.overal < 80 && stu.sco.pe.overal >= 70) stu.sco.pe.real_credit = credittemp * 0.75;else if (stu.sco.pe.overal < 70 && stu.sco.pe.overal >= 60) stu.sco.pe.real_credit = credittemp * 0.6;else stu.sco.pe.real_credit = 0;}; break;case 'E':{stu.sco.se.has = true;strcpy(stu.sco.se.credit, credit);strcpy(stu.sco.se.daily, daily);strcpy(stu.sco.se.experi, experi);strcpy(stu.sco.se.paper, paper);float credittemp;if (credit[2] == '0') credittemp = 100;else if (credit[1] != '\0')credittemp = ((int)credit[0] - 48) * 10 + (int)credit[1] - 48;else credittemp = (int)credit[0] - 48;float dailytemp, papertemp, experitemp;if (daily[2] == '0') dailytemp = 100;else if (daily[1] != '\0')dailytemp = ((int)daily[0] - 48) * 10 + (int)daily[1] - 48;else dailytemp = (int)daily[0] - 48;if (paper[2] == '0') papertemp = 100;else if (paper[1] != '\0')papertemp = ((int)paper[0] - 48) * 10 + (int)paper[1] - 48;else papertemp = (int)paper[0] - 48;if (strcmp(experi, "-1") == 0){stu.sco.se.overal = dailytemp * 0.3 + papertemp * 0.7;}else{if (experi[2] == '0') experitemp = 100;else if (experi[1] != '\0')experitemp = ((int)experi[0] - 48) * 10 + (int)experi[1] - 48;else experitemp = (int)experi[0] - 48;stu.sco.se.overal = dailytemp * 0.15 + experitemp * 0.15 + papertemp * 0.7;}if (stu.sco.se.overal >= 90 && stu.sco.se.overal <= 100)stu.sco.se.real_credit = credittemp;else if (stu.sco.se.overal < 90 && stu.sco.se.overal >= 80) stu.sco.se.real_credit = credittemp * 0.8;else if (stu.sco.se.overal < 80 && stu.sco.se.overal >= 70) stu.sco.se.real_credit = credittemp * 0.75;else if (stu.sco.se.overal < 70 && stu.sco.se.overal >= 60) stu.sco.se.real_credit = credittemp * 0.6;else stu.sco.se.real_credit = 0;}//已经全部存入stu}fseek(fp, -240L, 1);fwrite(&stu, 240, 1, fp);float finalcredit = 0;int n = 0;printf("修改如下:");printf("\n学号:%-15s姓名:%-s\n\n", stu.basic.id, stu.basic.name);if (stu.sco.ch.has){printf("课程编号:A    课程名称:语文    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.ch.overal, stu.sco.ch.real_credit); n++;finalcredit = finalcredit + stu.sco.ch.real_credit;}if (stu.sco.ma.has){printf("课程编号:B    课程名称:数学    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.ma.overal, stu.sco.ma.real_credit); n++;finalcredit = finalcredit + stu.sco.ma.real_credit;}if (stu.sco.en.has){printf("课程编号:C    课程名称:英语    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.en.overal, stu.sco.en.real_credit); n++;finalcredit = finalcredit + stu.sco.en.real_credit;}if (stu.sco.pe.has){printf("课程编号:D    课程名称:体育    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.pe.overal, stu.sco.pe.real_credit); n++;finalcredit = finalcredit + stu.sco.pe.real_credit;}if (stu.sco.se.has){printf("课程编号:E    课程名称:专业    综合成绩:%-10.2f实得学分:%-10.2f\n", stu.sco.se.overal, stu.sco.se.real_credit); n++;finalcredit = finalcredit + stu.sco.se.real_credit;}printf("\n\t\t\t\t   共修:%d科   实得总学分为:%.2f\n\n", n, finalcredit);printf("***********************************************************************************************************************\n");}}rewind(fp);}fcloseall();Paint_Start();
}
//判断是否为数字
int ifnum(char item[])//数字字符串判断,正确返回1,否则0
{bool isnum = true;for (int i = 0; item[i] != '\0'; i++){if (!(item[i] >= '0' && item[i] <= '9')){isnum = false;return 0;break;}}if(isnum) return 1;
}
//结束动画
void end()
{system("cls");printf("\n\n\n\t\t\t\t\t                 *\n");printf("\t\t\t\t\t            *  ***  ****\n");printf("\t\t\t\t\t          *** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t          **** ******* ****\n");printf("\t\t\t\t\t            *************\n");printf("\t\t\t\t\t                *****\n\n");Sleep(800);system("cls");printf("\n\n\n\t\t\t\t\t                 *\n");printf("\t\t\t\t\t               ***  ****\n");printf("\t\t\t\t\t            * **** ****\n");printf("\t\t\t\t\t          *** **** **** \n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         ****  *******  ****   \n");printf("\t\t\t\t\t          ****         ****\n");printf("\t\t\t\t\t            *************\n");printf("\t\t\t\t\t                *****\n\n");Sleep(100);system("cls");printf("\n\n\n\t\t\t\t\t                 *\n");printf("\t\t\t\t\t               ***  ****\n");printf("\t\t\t\t\t              **** ****\n");printf("\t\t\t\t\t            * **** **** \n");printf("\t\t\t\t\t          *** **** **** \n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         ****  *******  ****   \n");printf("\t\t\t\t\t         ****  感   谢  ****   \n");printf("\t\t\t\t\t          ****         ****\n");printf("\t\t\t\t\t            *************\n");printf("\t\t\t\t\t                *****\n\n");Sleep(100);system("cls");printf("\n\n\n\t\t\t\t\t                 *\n");printf("\t\t\t\t\t               ***  ****\n");printf("\t\t\t\t\t              **** ****\n");printf("\t\t\t\t\t              **** **** \n");printf("\t\t\t\t\t            * **** ****\n");printf("\t\t\t\t\t          *** **** **** \n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         ****  *******  ****   \n");printf("\t\t\t\t\t         ****           ****   \n");printf("\t\t\t\t\t         ****  感   谢  ****   \n");printf("\t\t\t\t\t          ****         ****\n");printf("\t\t\t\t\t            *************\n");printf("\t\t\t\t\t                *****\n\n");Sleep(100);system("cls");printf("\n\n\n\t\t\t\t\t                 *\n");printf("\t\t\t\t\t               ***  ****\n");printf("\t\t\t\t\t              **** ****\n");printf("\t\t\t\t\t              **** **** \n");printf("\t\t\t\t\t            * **** ****\n");printf("\t\t\t\t\t          *** **** **** \n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         **** **** **** ****\n");printf("\t\t\t\t\t         ****  *******  ****   \n");printf("\t\t\t\t\t         ****  感   谢  ****   \n");printf("\t\t\t\t\t         ****           ****   \n");printf("\t\t\t\t\t          **** 使   用 ****\n");printf("\t\t\t\t\t            *************\n");printf("\t\t\t\t\t                *****\n\n");Sleep(2000);
}

总结

1.编写过程中遇到很多问题,比如fclose关闭文件流,至今未搞明白,只有一个fp文件指针变量的信息查询,无论在哪调用fclose,无论调用多少次fclose,都无法关闭文件流,导致文件被进程占用,无法进行删除和替换,最终用fcloseall解决了,很奇怪。
2.冗余代码要删除,它们很容易干扰你的的思路。
3.输入时,缓冲区问题要注意。
4.仍然是case后忘加break问题,需要细心。
5.坐的时间长一定要出去走走,头脑清醒了思路来得更快,效率更高。

查看全文
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

相关文章

  1. win10下usb rndis驱动配置

    win10下usb rndis驱动会默认识别为com口,需要手动更新驱动。 先下载kindle_rndis.inf_amd64-v1.0.0.1,然后以管理员身份运行第五个cmd文件,然后在设备管理器里的USB串口识别出的COM口处双击,在计算机中查找驱动程序,即下载解压后的那个文件夹,然后网络适配器中就有RNDIS驱…...

    2024/4/12 20:10:53
  2. 使用js /javascript定义函数,定义全局变量和局部变量

    (一)js /javascript 用于:和用户进行交互的;是直译式的脚本语言,源码---->解释执行ECMAscript 是核心(定义了规范) 包含(DOM ,BOM = browser object modle)<script type="text/javascript"></script> 标签可以出现在HTML中的(乃至HTML外)的任…...

    2024/4/12 10:45:28
  3. sql树形结构查询语句

    执行sql语句 WITH COMMENT_CTE(ClassID,ClassParentID,ClassName) AS (SELECT ClassID,ClassParentID,ClassName FROM HardwareClassWHERE ClassParentID=126 UNION ALL SELECT c.ClassID,c.ClassParentID,c.ClassName FROM HardwareClass AS c INNER JOIN COMMENT_CTE AS c…...

    2024/4/12 10:45:04
  4. 数据结构(C语言版)+数据结构题集(C语言版)

    数据结构(C语言版) 高清PDF版下载——附随书光盘数据结构题集(C语言版) 高清PDF下载 转载于:https://www.cnblogs.com/gavinhughhu/archive/2010/02/09/1666837.html...

    2024/4/9 17:57:32
  5. 关于URL编码/javascript/js url 编码/url的三个js编码函数

    关于URL编码/javascript/js url 编码/url的三个js编码函数escape(),encodeURI(),encodeURIComponent() 本文为您讲述关于js(javascript)编码url的相关问题。(js中url编码&符号后传值给其它页面,多参数网址作为整体编码后传值。如:http://www.ilcng.com/index.html?id=ht…...

    2024/4/12 10:45:22
  6. 一招搞定win8系统无线网络经常受限问题

    无线网络受限制的原因有不少,可能是由于网络不稳定或信号中断之类的。如果只是偶尔发生,相信不会让那么多用户苦恼,让人抓狂的恐怕是时不时会发生,严重影响了上网的兴致。那么如何解决win8系统无线网络受限问题呢?1、鼠标右键单击桌面上的计算机图标,在弹出的菜单中选择“…...

    2024/4/12 10:45:16
  7. C语言使用单链表的学生成绩管理系统

    本系统的代码冗余还是蛮多的,其实可以再精简很多,可是后期自己懒得改了,这里强调一个思想----代码复用,这会大大节约自己的编程量,也可以使自己看待一个向项目有宏观的思想。关于这个系统,是采用单链表和文件写的,单链表在数据录入部分已经按照学号排好序,后期的数据输…...

    2024/4/22 12:41:47
  8. Oracle数据库常用SQL语句查询

    查询第一条记录where语句后面跟上 and rownum=1 2.日期所相差分钟数ceil((LOGOUT_TIME - LOGIN_TIME) * 24 * 60) 3.group by分组后,取得分组前的每一组的第一条记录---获取15届学生第一次登录wifi的最早时间select * from (select wifilogin.*,row_number() over(partition …...

    2024/5/3 13:27:42
  9. C语言数据类型与三大结构

    C语言数据类型与三大结构 数据类型 C语言数据类型可以分为基本类型和派生类型。 基本类型:整型,字符型,浮点型,布尔型。 派生类型:指针类型,枚举类型,数组类型,结构体类型,共用体类型 在不同的编译器环境下同一个数据类型可能占用不同的内存空间 32位环境下数据类型的…...

    2024/4/18 14:23:28
  10. 开源内容管理系统 - OssCMS

    开源内容管理系统发展趋势 内容管理系统的概念非常广泛,一般的网站系统,博客系统,文章系统都是内容管理系统的一种。CMS系统大致可分为框架型和应用型两大类,一种是框架型,本身不包含任何应用实现,只是提供了底层框架,具体应用需要二次开发; 另外一种是应用型,即本身是…...

    2024/5/3 13:18:19
  11. Intel(R) Wireless -N 7260问题(无线网卡驱动不可用的问题)

    问题描述:我一觉睡起来发现笔记本电脑连不上网了,点击电脑右下角的网络连接,发现什么都没有了(网络连接全是空白,没有本地连接,没有无线连接,没有宽带连接,之前都是有的)。我当时心里很慌,接下来就各种问百度(我感觉百度真的是一个特别耐心的帮手了),搜了很久,各…...

    2024/4/12 10:45:28
  12. C语言数据结构链队列的相关操作(创建、入队、出队、取对头元素)

    /* *l链队列的初始化 *判断链队列是否为空 *入队 *出队 *取对头元素 */ #include<stdio.h> typedef int element; typedef struct linkqueue {element data;struct linkqueue*next;}Link_Queue; typedef struct queuenode//头指针和尾指针 {Link_Queue*rear;Link_Queue*f…...

    2024/4/12 10:45:28
  13. 开源BI平台Openi的开发数据仓库系统(上)

    现在大家比较公认的商业智能系统分为报表、OLAP、数据仓库、数据挖掘和即席查询五大块,本身商业智能系统也只是一个比较新的概念,也许随着技术和应用的发展还会扩充出来很多模块。本文就基于开源BI平台Openi的数据仓库系统,进行整体设计及开发,就其中比较热门的技术,如OLA…...

    2024/4/12 10:44:58
  14. SQL语句(四)视图定义、查询、更新和删除

    一、视图定义CREATE VIEW 视图名AS 子查询WITH CHECK OPTION //可以省略二、视图查询、更新和基本表的查询语句类似,只是把表名的位置换成视图名就可以三、视图删除DROP VIEW 视图名 【CASCADE】//CASCADE为级联删除,可以省略四、实例1.创建一个“上海晓莉贸易商行”供应商供…...

    2024/4/9 17:57:25
  15. C语言实现数据结构顺序存储

    C语言实现数据结构顺序存储 // 头文件 #include <stdio.h> #include <stdlib.h> #include <malloc.h> #define MAXSIZE 10 //顺序存储结构 模仿数组的相关操作 typedef int DataType; typedef struct {DataType data[MAXSIZE];int length;}SqList; //增 删…...

    2024/4/12 10:45:10
  16. Ubuntu安装后未发现wifi适配器解决

    因为学习的需要,我在电脑上安装了ubuntu18的系统,然而装完ubuntu后却傻眼了: 网络连接未发现wifi适配器,下面分享以下我的解决办法: 1.下载驱动 2.安装 解压下载下来的.zip文件 cd ~/Downloads/MT7630E-release (如果你改变了存放路径,这里也要跟着改变) sudo chmod +x …...

    2024/4/19 9:07:43
  17. C语言小项目(简单的学生成绩管理系统)

    v C语言小项目v 实现一个学生成绩管理系统系统功能: 1.实现所有学生成绩的录入(利用结构体数组),当输入字符为end时候,结束成绩的录入; 2.实现所有学生信息的输出 3.输入指定学生姓名,并能输出这名学生的信息 4.将学生成绩按照语文和数学成绩排序v 思路:1. 首先,先把这…...

    2024/4/12 10:45:46
  18. JavaScript极其简单入门——小程序开发前准备

    1:JavaScript语句是发给浏览器的命令,告诉浏览器接下来要做什么事情。2:在HTML文件中引用JavaScript文件:<script src="script.js"></script>(现在不需要写了)3:.Js是可以插入到HTML中国任何位置的,但大多数放在head和body。 如果JS是关于页面…...

    2024/4/15 4:09:06
  19. mysql进阶(十九)SQL语句如何精准查找某一时间段的数据

    SQL语句如何精准查找某一时间段的数据在项目开发过程中,自己需要查询出一定时间段内的交易。故需要在sql查询语句中加入日期时间要素,sql语句如何实现?SELECT * FROM lmapp.lm_bill where tx_time Between 2015-12-20 And 2015-12-31;仔细研究还是能够发现一些细节性的问题的…...

    2024/4/12 10:45:52
  20. 【C语言课程设计】学习小组成绩管理系统

    【C语言课程设计】学习小组成绩管理系统 本年度C语言课程设计的成果。原本老师所给题目为学生信息管理系统,后经过修改,最终根据高中学习的灵感,设计了一个适用于高中的学习小组成绩管理系统。系统不仅仅具有课程设计的链表添加删除等功能,还有一些学习小组特有的功能。 本…...

    2024/4/12 22:51:34

最新文章

  1. C 深入指针(2)

    目录 1 野指针 1.1 成因 1.2 如何规避野指针 2 assert 断言 2.1 用法 2.2 assert 的优点 2.1 assert 的缺点 3 小注解 3.1 Debug 和 Release 1 野指针 【概念】&#xff1a; 野指针就是指针指向的位置是不可知的&#xff08;随机的、不正确的、没有明确限制的&#…...

    2024/5/3 13:45:06
  2. 梯度消失和梯度爆炸的一些处理方法

    在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言&#xff0c;在此感激不尽。 权重和梯度的更新公式如下&#xff1a; w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...

    2024/3/20 10:50:27
  3. python学习——re库的常用函数

    参考资料&#xff1a;python网络爬虫技术与应用【邓维】 1、match() 从字符串头部开始匹配字符。 import re content"The123456ismyonephonenumber." # 字符串长度 print(len(content)) # 使用match匹配&#xff0c;第一个参数为正则表达式&#xff0c;第二个参数…...

    2024/5/1 13:06:26
  4. 利用Sentinel解决雪崩问题(一)

    1、解决雪崩问题的常见方式有四种: 超时处理:设定超时时间&#xff0c;请求超过一定时间没有响应就返回错误信息&#xff0c;不会无休止等待;舱壁模式:限定每个业务能使用的线程数&#xff0c;避免耗尽整个tomcat的资源&#xff0c;因此也叫线程隔离;熔断降级:由断路器统计业务…...

    2024/5/1 13:07:43
  5. java的gradle,maven工程中使用selenium

    一、下载selenium库 &#xff08;1&#xff09;gradle工程 工程中会有一个build.gradle.kts的文件&#xff0c;这个文件可以定制 Gradle 的行为 在文件中添加下面代码&#xff0c;然后sync // implementation ("org.seleniumhq.selenium:selenium-java:4.19.1") …...

    2024/4/29 19:33:34
  6. 【外汇早评】美通胀数据走低,美元调整

    原标题:【外汇早评】美通胀数据走低,美元调整昨日美国方面公布了新一期的核心PCE物价指数数据,同比增长1.6%,低于前值和预期值的1.7%,距离美联储的通胀目标2%继续走低,通胀压力较低,且此前美国一季度GDP初值中的消费部分下滑明显,因此市场对美联储后续更可能降息的政策…...

    2024/5/1 17:30:59
  7. 【原油贵金属周评】原油多头拥挤,价格调整

    原标题:【原油贵金属周评】原油多头拥挤,价格调整本周国际劳动节,我们喜迎四天假期,但是整个金融市场确实流动性充沛,大事频发,各个商品波动剧烈。美国方面,在本周四凌晨公布5月份的利率决议和新闻发布会,维持联邦基金利率在2.25%-2.50%不变,符合市场预期。同时美联储…...

    2024/5/2 16:16:39
  8. 【外汇周评】靓丽非农不及疲软通胀影响

    原标题:【外汇周评】靓丽非农不及疲软通胀影响在刚结束的周五,美国方面公布了新一期的非农就业数据,大幅好于前值和预期,新增就业重新回到20万以上。具体数据: 美国4月非农就业人口变动 26.3万人,预期 19万人,前值 19.6万人。 美国4月失业率 3.6%,预期 3.8%,前值 3…...

    2024/4/29 2:29:43
  9. 【原油贵金属早评】库存继续增加,油价收跌

    原标题:【原油贵金属早评】库存继续增加,油价收跌周三清晨公布美国当周API原油库存数据,上周原油库存增加281万桶至4.692亿桶,增幅超过预期的74.4万桶。且有消息人士称,沙特阿美据悉将于6月向亚洲炼油厂额外出售更多原油,印度炼油商预计将每日获得至多20万桶的额外原油供…...

    2024/5/2 9:28:15
  10. 【外汇早评】日本央行会议纪要不改日元强势

    原标题:【外汇早评】日本央行会议纪要不改日元强势近两日日元大幅走强与近期市场风险情绪上升,避险资金回流日元有关,也与前一段时间的美日贸易谈判给日本缓冲期,日本方面对汇率问题也避免继续贬值有关。虽然今日早间日本央行公布的利率会议纪要仍然是支持宽松政策,但这符…...

    2024/4/27 17:58:04
  11. 【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响

    原标题:【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响近日伊朗局势升温,导致市场担忧影响原油供给,油价试图反弹。此时OPEC表态稳定市场。据消息人士透露,沙特6月石油出口料将低于700万桶/日,沙特已经收到石油消费国提出的6月份扩大出口的“适度要求”,沙特将满…...

    2024/4/27 14:22:49
  12. 【外汇早评】美欲与伊朗重谈协议

    原标题:【外汇早评】美欲与伊朗重谈协议美国对伊朗的制裁遭到伊朗的抗议,昨日伊朗方面提出将部分退出伊核协议。而此行为又遭到欧洲方面对伊朗的谴责和警告,伊朗外长昨日回应称,欧洲国家履行它们的义务,伊核协议就能保证存续。据传闻伊朗的导弹已经对准了以色列和美国的航…...

    2024/4/28 1:28:33
  13. 【原油贵金属早评】波动率飙升,市场情绪动荡

    原标题:【原油贵金属早评】波动率飙升,市场情绪动荡因中美贸易谈判不安情绪影响,金融市场各资产品种出现明显的波动。随着美国与中方开启第十一轮谈判之际,美国按照既定计划向中国2000亿商品征收25%的关税,市场情绪有所平复,已经开始接受这一事实。虽然波动率-恐慌指数VI…...

    2024/4/30 9:43:09
  14. 【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试

    原标题:【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试美国和伊朗的局势继续升温,市场风险情绪上升,避险黄金有向上突破阻力的迹象。原油方面稍显平稳,近期美国和OPEC加大供给及市场需求回落的影响,伊朗局势并未推升油价走强。近期中美贸易谈判摩擦再度升级,美国对中…...

    2024/4/27 17:59:30
  15. 【原油贵金属早评】市场情绪继续恶化,黄金上破

    原标题:【原油贵金属早评】市场情绪继续恶化,黄金上破周初中国针对于美国加征关税的进行的反制措施引发市场情绪的大幅波动,人民币汇率出现大幅的贬值动能,金融市场受到非常明显的冲击。尤其是波动率起来之后,对于股市的表现尤其不安。隔夜美国股市出现明显的下行走势,这…...

    2024/5/2 15:04:34
  16. 【外汇早评】美伊僵持,风险情绪继续升温

    原标题:【外汇早评】美伊僵持,风险情绪继续升温昨日沙特两艘油轮再次发生爆炸事件,导致波斯湾局势进一步恶化,市场担忧美伊可能会出现摩擦生火,避险品种获得支撑,黄金和日元大幅走强。美指受中美贸易问题影响而在低位震荡。继5月12日,四艘商船在阿联酋领海附近的阿曼湾、…...

    2024/4/28 1:34:08
  17. 【原油贵金属早评】贸易冲突导致需求低迷,油价弱势

    原标题:【原油贵金属早评】贸易冲突导致需求低迷,油价弱势近日虽然伊朗局势升温,中东地区几起油船被袭击事件影响,但油价并未走高,而是出于调整结构中。由于市场预期局势失控的可能性较低,而中美贸易问题导致的全球经济衰退风险更大,需求会持续低迷,因此油价调整压力较…...

    2024/4/26 19:03:37
  18. 氧生福地 玩美北湖(上)——为时光守候两千年

    原标题:氧生福地 玩美北湖(上)——为时光守候两千年一次说走就走的旅行,只有一张高铁票的距离~ 所以,湖南郴州,我来了~ 从广州南站出发,一个半小时就到达郴州西站了。在动车上,同时改票的南风兄和我居然被分到了一个车厢,所以一路非常愉快地聊了过来。 挺好,最起…...

    2024/4/29 20:46:55
  19. 氧生福地 玩美北湖(中)——永春梯田里的美与鲜

    原标题:氧生福地 玩美北湖(中)——永春梯田里的美与鲜一觉醒来,因为大家太爱“美”照,在柳毅山庄去寻找龙女而错过了早餐时间。近十点,向导坏坏还是带着饥肠辘辘的我们去吃郴州最富有盛名的“鱼头粉”。说这是“十二分推荐”,到郴州必吃的美食之一。 哇塞!那个味美香甜…...

    2024/4/30 22:21:04
  20. 氧生福地 玩美北湖(下)——奔跑吧骚年!

    原标题:氧生福地 玩美北湖(下)——奔跑吧骚年!让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 啊……啊……啊 两…...

    2024/5/1 4:32:01
  21. 扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!

    原标题:扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!扒开伪装医用面膜,翻六倍价格宰客!当行业里的某一品项火爆了,就会有很多商家蹭热度,装逼忽悠,最近火爆朋友圈的医用面膜,被沾上了污点,到底怎么回事呢? “比普通面膜安全、效果好!痘痘、痘印、敏感肌都能用…...

    2024/4/27 23:24:42
  22. 「发现」铁皮石斛仙草之神奇功效用于医用面膜

    原标题:「发现」铁皮石斛仙草之神奇功效用于医用面膜丽彦妆铁皮石斛医用面膜|石斛多糖无菌修护补水贴19大优势: 1、铁皮石斛:自唐宋以来,一直被列为皇室贡品,铁皮石斛生于海拔1600米的悬崖峭壁之上,繁殖力差,产量极低,所以古代仅供皇室、贵族享用 2、铁皮石斛自古民间…...

    2024/4/28 5:48:52
  23. 丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者

    原标题:丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者【公司简介】 广州华彬企业隶属香港华彬集团有限公司,专注美业21年,其旗下品牌: 「圣茵美」私密荷尔蒙抗衰,产后修复 「圣仪轩」私密荷尔蒙抗衰,产后修复 「花茵莳」私密荷尔蒙抗衰,产后修复 「丽彦妆」专注医学护…...

    2024/4/30 9:42:22
  24. 广州械字号面膜生产厂家OEM/ODM4项须知!

    原标题:广州械字号面膜生产厂家OEM/ODM4项须知!广州械字号面膜生产厂家OEM/ODM流程及注意事项解读: 械字号医用面膜,其实在我国并没有严格的定义,通常我们说的医美面膜指的应该是一种「医用敷料」,也就是说,医用面膜其实算作「医疗器械」的一种,又称「医用冷敷贴」。 …...

    2024/5/2 9:07:46
  25. 械字号医用眼膜缓解用眼过度到底有无作用?

    原标题:械字号医用眼膜缓解用眼过度到底有无作用?医用眼膜/械字号眼膜/医用冷敷眼贴 凝胶层为亲水高分子材料,含70%以上的水分。体表皮肤温度传导到本产品的凝胶层,热量被凝胶内水分子吸收,通过水分的蒸发带走大量的热量,可迅速地降低体表皮肤局部温度,减轻局部皮肤的灼…...

    2024/4/30 9:42:49
  26. 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...

    解析如下&#xff1a;1、长按电脑电源键直至关机&#xff0c;然后再按一次电源健重启电脑&#xff0c;按F8健进入安全模式2、安全模式下进入Windows系统桌面后&#xff0c;按住“winR”打开运行窗口&#xff0c;输入“services.msc”打开服务设置3、在服务界面&#xff0c;选中…...

    2022/11/19 21:17:18
  27. 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。

    %读入6幅图像&#xff08;每一幅图像的大小是564*564&#xff09; f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...

    2022/11/19 21:17:16
  28. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...

    win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面&#xff0c;在等待界面中我们需要等待操作结束才能关机&#xff0c;虽然这比较麻烦&#xff0c;但是对系统进行配置和升级…...

    2022/11/19 21:17:15
  29. 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...

    有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows&#xff0c;请勿关闭计算机”的提示&#xff0c;要过很久才能进入系统&#xff0c;有的用户甚至几个小时也无法进入&#xff0c;下面就教大家这个问题的解决方法。第一种方法&#xff1a;我们首先在左下角的“开始…...

    2022/11/19 21:17:14
  30. win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...

    置信有很多用户都跟小编一样遇到过这样的问题&#xff0c;电脑时发现开机屏幕显现“正在配置Windows Update&#xff0c;请勿关机”(如下图所示)&#xff0c;而且还需求等大约5分钟才干进入系统。这是怎样回事呢&#xff1f;一切都是正常操作的&#xff0c;为什么开时机呈现“正…...

    2022/11/19 21:17:13
  31. 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...

    Win7系统开机启动时总是出现“配置Windows请勿关机”的提示&#xff0c;没过几秒后电脑自动重启&#xff0c;每次开机都这样无法进入系统&#xff0c;此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一&#xff1a;开机按下F8&#xff0c;在出现的Windows高级启动选…...

    2022/11/19 21:17:12
  32. 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...

    有不少windows10系统用户反映说碰到这样一个情况&#xff0c;就是电脑提示正在准备windows请勿关闭计算机&#xff0c;碰到这样的问题该怎么解决呢&#xff0c;现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法&#xff1a;1、2、依次…...

    2022/11/19 21:17:11
  33. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...

    今天和大家分享一下win7系统重装了Win7旗舰版系统后&#xff0c;每次关机的时候桌面上都会显示一个“配置Windows Update的界面&#xff0c;提示请勿关闭计算机”&#xff0c;每次停留好几分钟才能正常关机&#xff0c;导致什么情况引起的呢&#xff1f;出现配置Windows Update…...

    2022/11/19 21:17:10
  34. 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...

    只能是等着&#xff0c;别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚&#xff0c;只能是考虑备份数据后重装系统了。解决来方案一&#xff1a;管理员运行cmd&#xff1a;net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...

    2022/11/19 21:17:09
  35. 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?

    原标题&#xff1a;电脑提示“配置Windows Update请勿关闭计算机”怎么办&#xff1f;win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢&#xff1f;一般的方…...

    2022/11/19 21:17:08
  36. 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...

    关机提示 windows7 正在配置windows 请勿关闭计算机 &#xff0c;然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;关机提示 windows7 正在配…...

    2022/11/19 21:17:05
  37. 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...

    钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...

    2022/11/19 21:17:05
  38. 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...

    前几天班里有位学生电脑(windows 7系统)出问题了&#xff0c;具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面&#xff0c;长时间没反应&#xff0c;无法进入系统。这个问题原来帮其他同学也解决过&#xff0c;网上搜了不少资料&#x…...

    2022/11/19 21:17:04
  39. 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...

    本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法&#xff0c;并在最后教给你1种保护系统安全的好方法&#xff0c;一起来看看&#xff01;电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中&#xff0c;添加了1个新功能在“磁…...

    2022/11/19 21:17:03
  40. 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...

    许多用户在长期不使用电脑的时候&#xff0c;开启电脑发现电脑显示&#xff1a;配置windows更新失败&#xff0c;正在还原更改&#xff0c;请勿关闭计算机。。.这要怎么办呢&#xff1f;下面小编就带着大家一起看看吧&#xff01;如果能够正常进入系统&#xff0c;建议您暂时移…...

    2022/11/19 21:17:02
  41. 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...

    配置windows update失败 还原更改 请勿关闭计算机&#xff0c;电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;配置windows update失败 还原更改 请勿关闭计算机&#x…...

    2022/11/19 21:17:01
  42. 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...

    不知道大家有没有遇到过这样的一个问题&#xff0c;就是我们的win7系统在关机的时候&#xff0c;总是喜欢显示“准备配置windows&#xff0c;请勿关机”这样的一个页面&#xff0c;没有什么大碍&#xff0c;但是如果一直等着的话就要两个小时甚至更久都关不了机&#xff0c;非常…...

    2022/11/19 21:17:00
  43. 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...

    当电脑出现正在准备配置windows请勿关闭计算机时&#xff0c;一般是您正对windows进行升级&#xff0c;但是这个要是长时间没有反应&#xff0c;我们不能再傻等下去了。可能是电脑出了别的问题了&#xff0c;来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...

    2022/11/19 21:16:59
  44. 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...

    我们使用电脑的过程中有时会遇到这种情况&#xff0c;当我们打开电脑之后&#xff0c;发现一直停留在一个界面&#xff1a;“配置Windows Update失败&#xff0c;还原更改请勿关闭计算机”&#xff0c;等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢&#xff0…...

    2022/11/19 21:16:58
  45. 如何在iPhone上关闭“请勿打扰”

    Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...

    2022/11/19 21:16:57