c语言实现学生基本信息管理系统
c语言实现学生基本信息管理系统
完整代码折叠如下,需要自取。
点击查看代码
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<conio.h>
#include <ctype.h>
#include<time.h>
# define N 100
typedef struct INFO
{
char name[N]; //姓名
char num[N]; //学号
char sex[N]; //性别
char dep[N]; //系别
char province[N];//籍贯
char mode[N];//高考模式
char score[N][N]; //高考成绩
char ethnic[N];//民族
char pro[N];//专业
int familyNum; //家庭人数
int fincome; //家庭收入
float t;
} Info;
void menu();
void Check_Information(); //查看学生基本信息
void Menu_Information_Handing(); //学生基本信息处理
void Input_Information(); //录入学生信息
void Modify_Information(); //修改学生基本信息
void Delete_Information(); //删除学生基本信息
void Menu_Servefor_pub();//统计信息公开
Info stu[100] = { "-","-","-","-","-","-","-","-","-",0,0}; //存储学生基本及比赛全部信息
Info stu2[100]; //作为另外一组 Info 结构体数组,暂存学生信息
int main()
{
char s[N]; //将 n 整型转化为字符串 s[N]
int n = 0; //选择菜单项目参数
char t; //判断是否继续的参数
char e[N];
while (1)
{
menu();
printf("请输入上述对应数字以进入相应界面:");
scanf_s("%s", s, 4);
n = atoi(s); //将输入的字符串转换为整型数
while (n <= 0 || n > 4)
{
fflush(stdin);
printf("输入有误,请再次输入数字 1~4:");
scanf_s("%s", s, 5);
n = atoi(s); //将输入的字符串转换为整型数
}
switch (n)
{
case 1:
getchar();
Check_Information();
break;
case 2:
printf("请输入口令:");
scanf_s("%s", e, 10);
if (!strcmp(e, "123456")) {
getchar();
Menu_Information_Handing();
}
break;
case 3:
getchar();
Menu_Servefor_pub();
break;
case 4:
system("cls");
printf("\n\n\n\n\n\n\n\n\n\t\t 退出学生信息管理系统?{(Y)、是 /(任意键)、否}\n");
t = _getch();
if (t 'Y' || t 'y')
{
system("cls");
printf("\n\n\n\n\n\n\n\n\n\t\t\t 退出管理系统,感谢您的使用!\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
exit(0);
}
break;
}
}
return 0;
}
void Menu_Servefor_pub() {
char s[N];
int n = 0; int i=0; int c = 0;
int m; int temp=0;
int clas;
FILE fp;
char str[1024];
int max[N] = { 0 }, min[N] = {999,999,999,999,999,999,999,999,999};
int maxnew[N] = { 0 }, minnew[N] = { 999,999,999,999,999,999,999,999,999 };
int sum, count, countprovince[N]={0};
char provinceALL[N][N]; char mark[N] = "\0";
int countethnic[N] = { 0 }; char TEMP[N];
char ethnicALL[N][N]; char sexual[N][N]; char Time[N][N];
float avg; int flag; char proALL[N][N];
int numTime[N][N]; int boy = 0, girl = 0;
int numClas[N][N]; int s_income[N];
time_t now;
struct tm e;
time(&now);
localtime_s(&e, &now);
for (int s = 0; s < 100; s++) {
s_income[s] = 0;
}
for (int s = 0; s < 100; s++) {
numClas[s][1] = 0;
numClas[s][2] = 0;
}
for (int s = 0; s < 100; s++) {
numTime[s][1] = 0;
numTime[s][2] = 0;
}
if ((fopen_s(&fp, "C:\Users\80958\Desktop\test00.txt", "r")) == NULL)
printf("打开失败!");
system("cls");
printf("\t\t********************************************\n");
printf("\t\t * * * * * * * * * * * * * * * * * * * * \n");
printf("\t\t\t 学 生 信 息 管 理 系 统 * \n");
printf("\t\t 统计信息公开 \n");
printf("\t\t * * \n");
printf("\t\t 1.按学号查询某个学生的基本信息 \n");
printf("\t\t 2.按班级号查询该班全体学生的基本信息 \n");
printf("\t\t 3.按年级查询该年级全体学生基本信息 \n");
printf("\t\t 4.按专业查询全体学生基本信息 \n");
printf("\t\t 5.按班级查询高考成绩相关信息 \n");
printf("\t\t 6.按班级统计该班生源所属省市人数 \n");
printf("\t\t 7.按年级统计不同少数民族学生人数 \n");
printf("\t\t 8.按专业统计不同年级男女生人数 \n");
printf("\t\t 9.按年级统计各班低于平均收入的同学 \n");
printf("\t\t 10.按年级统计专业人数 \n");
printf("\t\t * * *\n");
printf("\t\t******************************************\n");
printf("-------------------------------------------------------------------------------\n");
printf("请输入上述对应数字以进入相应界面(系统将忽略小数位):");
scanf_s("%s", s, 5);
getchar();
n = atoi(s); //将输入的字符串转换为整型数
while (n <= 0 || n > 10)//加强鲁棒性
{
fflush(stdin);
printf("输入有误,请再次输入数字 1~10:");
scanf_s("%s", s, 5);
getchar();
n = atoi(s);
}
while (!feof(fp))//遍历读取文件
{
fscanf_s(fp, "%10s %10s %s %10s %10s %s ", stu[i].name, 10, stu[i].num, 10, stu[i].sex, 3, stu[i].dep, 10, stu[i].province, 10, stu[i].mode, 3);
if (!atoi(stu[i].mode)) {
for (int t = 0; t < 4; t++)
fscanf_s(fp, "%s", stu[i].score[t], 5);
}
else for (int t = 0; t < 9; t++)fscanf_s(fp, "%s", stu[i].score[t], 5);
fscanf_s(fp, "%10s %10s %d %d", stu[i].ethnic, 10, stu[i].pro, 10, &stu[i].familyNum, &stu[i].fincome);
i++;
}
fclose(fp);
switch (n)
{
case 1:
fflush(stdin);
printf("请输入查找的学生学号(8 位):");
gets_s(str);
while ((strlen(str) != 8) || ((atoi(str) / 10000) > e.tm_year + 1900)|| ((atoi(str) / 10000) < e.tm_year + 1896))
{
printf("输入有误,请输入 8 位学号数:");//加强鲁棒性
gets_s(str);
}
printf("\t姓名\t学号\t性别\t系别\t籍贯\t高考模式\t高考成绩\t 民族\t专业\t家庭人数\t家庭收入\n");
for (int p = 0; p < i; p++) {
if (!strcmp(stu[p].num, str)) {
printf("%10s %10s %s %10s %10s %s ", stu[p].name, stu[p].num, stu[p].sex, stu[p].dep, stu[p].province, stu[p].mode);
if (!atoi(stu[p].mode)) {
for (int t = 0; t < 4; t++)printf("%s ", stu[p].score[t]);
}
else for (int t = 0; t < 9; t++)printf("%s ", stu[p].score[t]);
printf("%10s %10s %d %d\n", stu[p].ethnic, stu[p].pro, stu[p].familyNum, stu[p].fincome);
}
}
printf("按任意键退出...");
_getch();
break;
case 2:
fflush(stdin);
printf("请输入查找的班级(4 位):");
gets_s(str);
while (strlen(str) != 4)//加强鲁棒性
{
printf("输入有误,请输入 4 位班级号:");
gets_s(str);
}
printf("\t姓名\t学号\t性别\t系别\t籍贯\t高考模式\t高考成绩\t 民族\t专业\t家庭人数\t家庭收入\n");
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; p<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> (atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">100</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">%</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> atoi(str)) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[p].name, stu[p].num, stu[p].sex, stu[p].dep, stu[p].province, stu[p].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[p].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[p].ethnic, stu[p].pro, stu[p].familyNum, stu[p].fincome);
}
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"按任意键退出..."</span>);
_getch();
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入查找的年级(4 位):"</span>);<span class="hljs-comment" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 128, 0);">//加强鲁棒性 </span>
gets_s(str);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (strlen(str) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>)
{
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请输入 4 位年级号:"</span>);
gets_s(str);
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>姓名<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>学号<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>性别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>系别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>籍贯<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考模式<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考成绩<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span> 民族<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>专业<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭人数<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭收入<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; p<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> atoi(str)) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[p].name, stu[p].num, stu[p].sex, stu[p].dep, stu[p].province, stu[p].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[p].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[p].ethnic, stu[p].pro, stu[p].familyNum, stu[p].fincome);
}
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"按任意键退出..."</span>);
_getch();
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入查找的专业:"</span>);<span class="hljs-comment" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 128, 0);">//加强鲁棒性 </span>
gets_s(str);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>姓名<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>学号<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>性别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>系别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>籍贯<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考模式<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考成绩<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span> 民族<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>专业<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭人数<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭收入<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; p<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>strcmp(str, stu[p].pro)) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[p].name, stu[p].num, stu[p].sex, stu[p].dep, stu[p].province, stu[p].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[p].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[p].ethnic, stu[p].pro, stu[p].familyNum, stu[p].fincome);
}
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"按任意键退出..."</span>);
_getch();
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">5</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入查找的班级(4 位):"</span>);
gets_s(str);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (strlen(str) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>)
{<span class="hljs-comment" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 128, 0);">//加强鲁棒性 </span>
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请输入 4 位班级号:"</span>);
gets_s(str);
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>姓名<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>学号<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考成绩 <span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; p<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> (atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">100</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">%</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> atoi(str)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[p].mode)) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s %s "</span>, stu[p].name, stu[p].num);
sum <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
sum <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+=</span> atoi(stu[p].score[t]);
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, sum);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> {
sum <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
sum <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+=</span> atoi(stu[p].score[t]);
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, sum);
}
}
}
sum <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; count <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; p<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> (atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">100</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">%</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> atoi(str)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[p].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (max[t] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> atoi(stu[p].score[t]))max[t] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[p].score[t]);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (min[t] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> atoi(stu[p].score[t]))min[t] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[p].score[t]);
sum <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+=</span> atoi(stu[p].score[t]);
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (max[t] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> atoi(stu[p].score[t]))maxnew[t] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[p].score[t]);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (min[t] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> atoi(stu[p].score[t]))minnew[t] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[p].score[t]);
sum <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+=</span> atoi(stu[p].score[t]);
}
}
count<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (count <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"没这个班的学生"</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> {
avg <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> sum <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> count;
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"本功能初始化为999<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"这个班旧高考科目最高分分别为语文%d数学%d英语%d综合%d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, max[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>], max[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>], max[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">2</span>], max[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"这个班旧高考科目最低分分别为语文%d数学%d英语%d综合%d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, min[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>], min[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>], min[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">2</span>], min[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"这个班新高考科目最高分分别为语文%d数学%d英语%d政%d史%d地%d生%d物%d化%<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, maxnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>], maxnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>], maxnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">2</span>], maxnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>], maxnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>], maxnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">5</span>], maxnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">6</span>], maxnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">7</span>], maxnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">8</span>]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"这个班新高考科目最低分分别为语文%d数学%d英语%d政%d史%d地%d生%d物%d化%d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, minnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>], minnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>], minnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">2</span>], minnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>], minnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>], minnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">5</span>], minnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">6</span>], minnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">7</span>], minnew[<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">8</span>]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"这个班学生平均总分为%f"</span>, avg);
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"按任意键退出..."</span>);
_getch();
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">6</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入查找的班级(4 位):"</span>);
gets_s(str);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (strlen(str) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>)
{
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请输入 4 位班级:"</span>);
gets_s(str);
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>姓名<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>学号<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>性别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>系别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>籍贯<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考模式<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考成绩<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span> 民族<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>专业<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭人数<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭收入<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; p<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> (atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">100</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">%</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> atoi(str)) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[p].name, stu[p].num, stu[p].sex, stu[p].dep, stu[p].province, stu[p].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[p].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[p].ethnic, stu[p].pro, stu[p].familyNum, stu[p].fincome);
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; p<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> (atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">100</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">%</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> atoi(str)) {
flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int q <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; q <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><=</span> temp; q<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>strcmp(provinceALL[q], stu[p].province)) {
countprovince[q]<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>;
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>) {
strcpy_s(provinceALL[temp], stu[p].province);
countprovince[temp]<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
temp <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>;
}
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (countprovince[c]) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"来自%s的有%d人<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, provinceALL[c], countprovince[c]);
c<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"按任意键退出..."</span>);
_getch();
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">7</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入查找的年级(4 位):"</span>);
gets_s(str);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (strlen(str) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>)
{
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请输入 4 位年份:"</span>);
gets_s(str);
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>姓名<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>学号<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>性别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>系别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>籍贯<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考模式<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考成绩<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span> 民族<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>专业<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭人数<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭收入<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; p<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> atoi(str)) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[p].name, stu[p].num, stu[p].sex, stu[p].dep, stu[p].province, stu[p].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[p].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[p].ethnic, stu[p].pro, stu[p].familyNum, stu[p].fincome);
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; p<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> atoi(str)) {
flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int q <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; q <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><=</span> temp; q<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>strcmp(ethnicALL[q], stu[p].ethnic)) {
countethnic[q]<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>;
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>) {
strcpy_s(ethnicALL[temp], stu[p].ethnic);
countethnic[temp]<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
temp <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>;
}
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (countethnic[c]) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s的有%d人<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, ethnicALL[c], countethnic[c]);
c<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"按任意键退出..."</span>);
_getch();
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">8</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入查找的专业:"</span>);
gets_s(str);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>姓名<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>学号<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>性别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>系别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>籍贯<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考模式<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考成绩<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span> 民族<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>专业<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭人数<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭收入<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; p<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>strcmp(str, stu[p].pro)) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[p].name, stu[p].num, stu[p].sex, stu[p].dep, stu[p].province, stu[p].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[p].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[p].ethnic, stu[p].pro, stu[p].familyNum, stu[p].fincome);
flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int q <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; q <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><=</span> temp; q<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
c <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (numTime[q][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> c) {
flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>;
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>) {
numTime[temp][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> c;
temp<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
}
}
}
flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; p<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>strcmp(str, stu[p].pro)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int q <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; q <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> temp; q<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> ((atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> numTime[q][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>]) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>strcmp(stu[p].sex, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"M"</span>)) {
numTime[q][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>]<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>strcmp(stu[p].sex, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"W"</span>)) {
numTime[q][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">2</span>]<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
}
}
}
}
}
c <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (c<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span>temp) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s专业%d级的男生有%d人,女生有%d人<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, str, numTime[c][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>], numTime[c][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>], numTime[c][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">2</span>]);
c<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"按任意键退出..."</span>);
_getch();
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入查找的年级(4 位):"</span>);
gets_s(str);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (strlen(str) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>)
{<span class="hljs-comment" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 128, 0);">//加强鲁棒性 </span>
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请输入 4 位年份:"</span>);
gets_s(str);
}
temp <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; p<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
c <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>;
_itoa_s(c, <span class="hljs-type" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">TEMP</span>, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>strcmp(str,<span class="hljs-type" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">TEMP</span>)) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[p].name, stu[p].num, stu[p].sex, stu[p].dep, stu[p].province, stu[p].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[p].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[p].ethnic, stu[p].pro, stu[p].familyNum, stu[p].fincome);
flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int q <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; q <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><=</span> temp; q<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
c <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> (atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">100</span>)<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">%</span><span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (numClas[q][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> c) {
flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>;
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>) {
numClas[temp][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> c;
temp<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
}
}
}
flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; p<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>;
_itoa_s(flag, <span class="hljs-type" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">TEMP</span>,<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>strcmp(str, <span class="hljs-type" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">TEMP</span>)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int q <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; q <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> temp; q<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (((atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">100</span>)<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">%</span><span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> numClas[q][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>]) {
numClas[q][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>]<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
s_income[q] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+=</span> stu[p].fincome;
}
}
}
}
c <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; boy <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (c <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> temp) {
s_income[c] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> s_income[c] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> numClas[c][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>];
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int count <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>, q<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span><span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;q<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span>i<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> count<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span>numClas[c][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>];q<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (((atoi(stu[q].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">100</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">%</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> numClas[c][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>]) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (stu[q].fincome <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> s_income[c])boy<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
count<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
}
}
numClas[c][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">2</span>] <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> boy;
c<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
}
c <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (c <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> temp) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s级%d班有%d人家庭收入低于该班级全体同学家庭平均收入<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, str, numClas[c][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>], numClas[c][<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">2</span>]);
c<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"按任意键退出..."</span>);
_getch();
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入查找的年级(4 位):"</span>);
gets_s(str);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (strlen(str) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>)
{
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请输入 4 位年级号:"</span>);
gets_s(str);
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>姓名<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>学号<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>性别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>系别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>籍贯<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考模式<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考成绩<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span> 民族<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>专业<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭人数<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭收入<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; p<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> atoi(str)) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[p].name, stu[p].num, stu[p].sex, stu[p].dep, stu[p].province, stu[p].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[p].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[p].score[t]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[p].ethnic, stu[p].pro, stu[p].familyNum, stu[p].fincome);
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; p<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[p].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (clas <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> atoi(str)) {
flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int q <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; q <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><=</span> temp; q<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>strcmp(proALL[q], stu[p].pro)) {
countprovince[q]<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>;
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (flag <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>) {
strcpy_s(proALL[temp], stu[p].pro);
countprovince[temp]<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
temp <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> p <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>;
}
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (countprovince[c]) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s的有%d人<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, proALL[c], countprovince[c]);
c<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"按任意键退出..."</span>);
_getch();
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">default</span>:
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
}
}
void menu()
{
system("cls"); //清屏
printf("\t\t\n");
printf("\t\t* * * * * * * * * * * * * * * * * * * * * \n");
printf("\t\t\t 学 生 信 息 管 理 系 统 * \n");
printf("\t\t\t\t 主菜单 * \n");
printf("\t\t\t\t * * * \n");
printf("\t\t * 1.查看学生基本信息 * \n");
printf("\t\t * 2.学生基本信息处理 * \n");
printf("\t\t * 3.统计信息公开 * \n");
printf("\t\t * 4.退出管理系统 * \n");
printf("\t\t\t\t * * *\n");
printf("\t\t\n");
printf("-------------------------------------------------------------------------------\n");
}
/功能:查看学生基本信息/
void Check_Information()
{
FILE fp;
int i = 0;
if ((fopen_s(&fp,"C:\Users\80958\Desktop\test00.txt", "r")) == NULL)
printf("打开失败!");
system("cls");
printf("\t\t********************************************\n");
printf("\t\t \n");
printf("\t\t 学 生 信 息 管 理 系 统 \n");
printf("\t\t 查看学生基本信息 \n");
printf("\t\t *\n");
printf("\t\t********************************************\n");
printf("-------------------------------------------------------------------------------\n");
printf("\t姓名\t学号\t性别\t系别\t籍贯\t高考模式\t高考成绩\t 民族\t专业\t家庭人数\t家庭收入\n");
printf("-------------------------------------------------------------------------------\n");
while (!feof(fp))
{
fscanf_s(fp, "%10s %10s %s %10s %10s %s ", stu[i].name,10, stu[i].num,10, stu[i].sex,3, stu[i].dep,10, stu[i].province,10, stu[i].mode,3);
if (!atoi(stu[i].mode)) {
for (int t = 0; t < 4; t++)
fscanf_s(fp, "%s", stu[i].score[t],5);
}
else for (int t = 0; t < 9; t++)fscanf_s(fp, "%s", stu[i].score[t],5);
fscanf_s(fp, "%10s %10s %d %d", stu[i].ethnic,10, stu[i].pro,10, &stu[i].familyNum, &stu[i].fincome);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[i].name, stu[i].num, stu[i].sex, stu[i].dep, stu[i].province, stu[i].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[i].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[i].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[i].score[t]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d"</span>, stu[i].ethnic, stu[i].pro, stu[i].familyNum, stu[i].fincome);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
i<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"按任意键返回主菜单!"</span>);
_getch();
fclose(fp);
}
/功能:2.参赛学生基本信息菜单/
void Menu_Information_Handing()
{
char s[N];
int n = 0;
system("cls");
printf("\t\t\n");
printf("\t\t* * * * * * * * * * * * * * * * * * * * * \n");
printf("\t\t\t 学 生 信 息 管 理 系 统 * \n");
printf("\t\t 学生基本信息处理(录入、修改、删除) \n");
printf("\t\t * * \n");
printf("\t\t 1.录入学生基本信息 \n");
printf("\t\t 2.修改学生基本信息 \n");
printf("\t\t 3.删除学生基本信息 \n");
printf("\t\t 4.返回主菜单 \n");
printf("\t\t * * *\n");
printf("\t\t\n");
printf("-------------------------------------------------------------------------------\n");
printf("请输入上述对应数字以进入相应界面(系统将忽略小数位):");
scanf_s("%s", s,5);
getchar();
n = atoi(s); //将输入的字符串转换为整型数
while (n <= 0 || n > 4)
{
fflush(stdin);
printf("输入有误,请再次输入数字 1~4:");
scanf_s("%s", s,5);
n = atoi(s);
}
switch (n)
{
case 1:
Input_Information();
break;
case 2:
Modify_Information();
break;
case 3:
Delete_Information();
break;
case 4:
break;
}
}
/函数功能:录入学生信息/
void Input_Information()
{
FILE* fp;
char t;
int i, n, m, z; int r;
char s[N];
time_t now;
struct tm e;
time(&now);
localtime_s(&e, &now);
fopen_s(&fp,"C:\Users\80958\Desktop\test00.txt", "a+");
do
{
printf("\n******************************************\n");
printf("请输入要录入的人数:");
scanf_s("%s", s,5);
getchar();
n = atoi(s);
while (n <= 0)
{
fflush(stdin);
printf("输入有误,请再次输入正确人数,或输入-1直接停止:");
scanf_s("%s", s,5);
n = atoi(s);
if (n -1)break;
}
printf("\n 请按以下对应信息正确录入!\n");
for (i = 0; i < n; i++)
{
system("cls");
//清空输入缓冲区
printf("-------------------------------------------------------------------------------\n");
printf("请输入第%d 名学生姓名:", i + 1);
fflush(stdin);
gets_s(stu[i].name);
fflush(stdin);
printf("请输入第%d 名学生学号(8 位):", i + 1);
gets_s(stu[i].num);
while ((strlen(stu[i].num) != 8) || ((atoi(stu[i].num) / 10000) > e.tm_year + 1900)|| ((atoi(stu[i].num) / 10000) < e.tm_year + 1896))
{
printf("输入有误,请输入 8 位学号数:");
gets_s(stu[i].num);
}
fflush(stdin);
printf("请输入第%d 名学生性别([男].M/[女].W):", i + 1);
scanf_s("%s",stu[i].sex,5);
while (strcmp(stu[i].sex, "M") && strcmp(stu[i].sex, "W"))
{
fflush(stdin);
printf("输入有误,请按要求正确输入([男].M/[女].W):");
scanf_s("%s", stu[i].sex,5);
}
getchar();
printf("请输入第%d 名学生系别(1~4):", i + 1);
gets_s(stu[i].dep);
m = atoi(stu[i].dep);
while ((m 0 || m > 4) || strlen(stu[i].dep) != 1)
{
fflush(stdin);
printf("输入有误,请按要求正确输入系别(1~4):");
gets_s(stu[i].dep);
m = atoi(stu[i].dep);
}
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入第%d 名学生籍贯(精确到市):"</span>, i <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>);
gets_s(stu[i].province);
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入第%d 名学生的高考模式(0_旧高考,1_新高考):"</span>, i <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>);
gets_s(stu[i].mode);
m <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[i].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (strcmp(stu[i].mode, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"0"</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> strcmp(stu[i].mode, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"1"</span>))
{
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请按要求正确输入高考模式(0_旧高考,1_新高考):"</span>);
gets_s(stu[i].dep);
m <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[i].dep);
}
fflush(stdin);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[i].mode)) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入第%d 名学生高考成绩:<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>语文<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>数学<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>英语<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>综合<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, i <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">do</span>
{
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>, stu[i].score[t],<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">20</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span>((atoi(stu[i].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">150</span> <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[i].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">300</span> <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[i].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>))
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请按要求正确输入第%d科成绩"</span>, t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>);
}<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span>((atoi(stu[i].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">150</span> <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[i].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">300</span> <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[i].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>));
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入第%d 名学生高考成绩,没考的科目写零分:<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>语文<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>数学<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>英语<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>政治<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>历史<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>地理<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>生物<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>物理<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>化学<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, i <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">do</span> {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">do</span>
{
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>, stu[i].score[t], <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">20</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> ((atoi(stu[i].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">150</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[i].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>))
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请按要求正确输入第%d科成绩"</span>, t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>);
} <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> ((atoi(stu[i].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">150</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[i].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>));
}
z <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
z <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+=</span> atoi(stu[i].score[t]);
}
} <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (z <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">750</span>);
}
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入第%d 名学生民族(要写族):"</span>, i <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>,stu[i].ethnic,<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">20</span>);
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入第%d 名学生专业(写全称):"</span>, i <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>, stu[i].pro,<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">20</span>);
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入第%d 名学生家庭人数:"</span>, i <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%d"</span>,<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&</span>stu[i].familyNum);
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入第%d 名学生家庭收入:"</span>, i <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%d"</span>, <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&</span>stu[i].fincome);
getchar();
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[i].name, stu[i].num, stu[i].sex, stu[i].dep,stu[i].province, stu[i].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[i].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[i].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[i].score[t]);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[i].ethnic, stu[i].pro,stu[i].familyNum, stu[i].fincome);
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"是否继续输入?([Y].是/[任意键].否)<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> _getch();
} <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> '<span class="hljs-type" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">Y</span>' <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> 'y');
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"信息已保存,按任意键返回主菜单!"</span>);
_getch();
fclose(fp);
}
/函数功能:修改学生基本信息/
void Modify_Information()
{
FILE* fp;
char str[N];
char t;
int i = -1, x = 0;
int j, m;
time_t now;
struct tm e;
time(&now);
localtime_s(&e, &now);
fopen_s(&fp,"C:\Users\80958\Desktop\test00.txt", "r+");
printf("-------------------------------------------------------------------------------<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">n");
printf("<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">t姓名<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">t学号<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">t性别<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">t系别<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">t籍贯<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">t高考模式<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">t高考成绩<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">t<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">t<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">t民族<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">t专业<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">t家庭人数<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">t家庭收入<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">n");
printf("-------------------------------------------------------------------------------<span class="hljs-title class_" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">n");
while (!feof(fp))
{
i++;
fscanf_s(fp, "%10s %10s %s %10s %10s %s ", stu[i].name, 10, stu[i].num, 10, stu[i].sex, 3, stu[i].dep, 10, stu[i].province, 10, stu[i].mode, 3);
if (!atoi(stu[i].mode)) {
for (int t = 0; t < 4; t++)
fscanf_s(fp, "%s", stu[i].score[t], 5);
}
else for (int t = 0; t < 9; t++)fscanf_s(fp, "%s", stu[i].score[t], 5);
fscanf_s(fp, "%10s %10s %d %d", stu[i].ethnic, 10, stu[i].pro, 10, &stu[i].familyNum, &stu[i].fincome);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[i].name, stu[i].num, stu[i].sex, stu[i].dep, stu[i].province, stu[i].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[i].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>, stu[i].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>, stu[i].score[t]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d"</span>, stu[i].ethnic, stu[i].pro, stu[i].familyNum, stu[i].fincome);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">do</span>
{
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入要修改信息的学生姓名:"</span>);
fflush(stdin);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>,str,<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10</span>);
getchar();
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> (i <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>); j<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)
{
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (strcmp(str, stu[j].name) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>)
{
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"----------------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>姓名<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>学号<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>性别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>系别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>籍贯<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考模式<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考成绩<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span><span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span><span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>民族<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>专业<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭人数<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭收入<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"----------------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>, stu[j].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>, stu[j].score[t]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d"</span>, stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"1.姓名2.学号3.性别4.系别5.籍贯6.高考模式7.高考成绩8.民族9.专业10.家庭人数11.家庭收入<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>输入要修改的信息:"</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%d"</span>, <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&</span>x);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
system(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"cls"</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">switch</span> (x)
{
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"修改该学生姓名:"</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s"</span>,stu[j].name,<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10</span>);
getchar();
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
fseek(fp, j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">*</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">96</span>, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">2</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"修改该学生学号:"</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s"</span>,stu[j].num,<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10</span>);
getchar();
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> ((strlen(stu[j].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">8</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> ((atoi(stu[j].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> e.tm_year <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1900</span>)<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> ((atoi(stu[j].num) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">/</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10000</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> e.tm_year <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1896</span>))
{
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请输入 8 位学号数:"</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s"</span>, stu[j].num, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10</span>);
getchar();
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
fseek(fp, j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">*</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">96</span>, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"修改该学生性别:"</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>, stu[i].sex,<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>);
getchar();
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (strcmp(stu[j].sex, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"M"</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> strcmp(stu[j].sex, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"W"</span>))
{
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请按要求正确输入([男].M/[女].W):"</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>, stu[i].sex,<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>);
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
fseek(fp, j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">*</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">96</span>, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"修改该学生系别:"</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>,stu[j].dep,<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10</span>);
m <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[j].dep);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> ((m <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span> <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> m <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> strlen(stu[j].dep) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>)
{
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请按要求正确输入系别(1~4):"</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>, stu[j].dep, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10</span>);
m <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[j].dep);
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
fseek(fp, j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">*</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">96</span>, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">5</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"修改该学生籍贯:"</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s"</span>,stu[j].province,<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
fseek(fp, j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">*</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">96</span>, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">6</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"修改该学生高考模式(0_旧高考1_新高考):"</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%3s"</span>,stu[j].mode,<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>);
getchar();
m <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[j].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (strcmp(stu[j].mode, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"0"</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> strcmp(stu[j].mode, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"1"</span>))
{
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请按要求正确输入高考模式(0_旧高考,1_新高考):"</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%3s"</span>, stu[j].mode, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>);
getchar();
m <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> atoi(stu[j].mode);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入学生高考成绩,没考的科目写零分:<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>语文<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>数学<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>英语<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>综合<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">do</span>
{
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>,stu[j].score[t],<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> ((atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">150</span> <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">300</span> <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>))
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请按要求正确输入第%d科成绩"</span>, t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>);
} <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> ((atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">150</span> <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">300</span> <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>));
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入学生高考成绩,没考的科目写零分:<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>语文<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>数学<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>英语<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>政治<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>历史<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>地理<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>生物<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>物理<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>化学<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">do</span>
{
scanf_s(stu[j].score[t]);
getchar();
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> ((atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">150</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>))
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请按要求正确输入第%d科成绩"</span>, t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>);
} <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> ((atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">150</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>));
}
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
fseek(fp, j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">*</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">96</span>, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">7</span>:
fflush(stdin);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入学生高考成绩,没考的科目写零分:<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>语文<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>数学<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>英语<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>综合<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">do</span>
{
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>, stu[j].score[t], <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> ((atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">150</span> <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">300</span> <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>))
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请按要求正确输入第%d科成绩"</span>, t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>);
} <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> ((atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">150</span> <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">300</span> <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&&</span> t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">3</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>));
}
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> {
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入学生高考成绩,没考的科目写零分:<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>语文<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>数学<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>英语<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>政治<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>历史<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>地理<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>生物<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>物理<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>化学<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">do</span>
{
scanf_s(stu[j].score[t]);
getchar();
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> ((atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">150</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>))
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误,请按要求正确输入第%d科成绩"</span>, t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>);
} <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> ((atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">150</span>) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> (atoi(stu[j].score[t]) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>));
}
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
fseek(fp, j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">*</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">96</span>, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">8</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"修改该学生民族:"</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s"</span>,stu[j].ethnic,<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
fseek(fp, j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">*</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">96</span>, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"修改该学生专业:"</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s"</span>,stu[j].pro,<span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
fseek(fp, j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">*</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">96</span>, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">10</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"修改该学生家庭人数:"</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%d"</span>,<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&</span>stu[j].familyNum);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
fseek(fp, j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">*</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">96</span>, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">case</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">11</span>:
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"修改该学生家庭收入:"</span>);
scanf_s(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%d"</span>, <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&</span>stu[j].fincome);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
fseek(fp, j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">*</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">96</span>, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">default</span>:
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"输入有误!<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
}
}
fflush(stdin);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">></span> i) printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"查无此人!<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"是否继续输入?([Y].是/[任意键].否)<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> _getch();
} <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> '<span class="hljs-type" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">Y</span>' <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> 'y');
fclose(fp);
}
/函数功能:删除学生基本信息/
void Delete_Information()
{
FILE* fp;
char str[N];
char t, ch;
int i = 0;
int j, n;
fopen_s(&fp,"C:\Users\80958\Desktop\test00.txt", "r+");
printf("--------------------------------------------------------------------------------------\n");
printf("\t姓名\t学号\t性别\t系别\t籍贯\t高考模式\t高考成绩\t\t\t民族\t专业\t家庭人数\t家庭收入\n");
printf("--------------------------------------------------------------------------------------\n");
while (!feof(fp))
{
fscanf_s(fp, "%10s %10s %s %10s %10s %s ", stu[i].name,10, stu[i].num, 10, stu[i].sex,3, stu[i].dep, 10, stu[i].province, 10, stu[i].mode,3);
if (!atoi(stu[i].mode)) {
for (int t = 0; t < 4; t++)
fscanf_s(fp, "%5s", stu[i].score[t],5);
}
else for (int t = 0; t < 9; t++)
fscanf_s(fp, "%s", stu[i].score[t],5);
fscanf_s(fp, "%10s %10s %d %d", stu[i].ethnic, 10, stu[i].pro, 10, &stu[i].familyNum, &stu[i].fincome);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[i].name, stu[i].num, stu[i].sex, stu[i].dep, stu[i].province, stu[i].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[i].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[i].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[i].score[t]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d"</span>, stu[i].ethnic, stu[i].pro, stu[i].familyNum, stu[i].fincome);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
i<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>;
}
fclose(fp);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">do</span>
{
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"请输入要删除信息的学生姓名:"</span>);
fflush(stdin);
gets_s(str);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; j<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)
{
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (strcmp(str, stu[j].name) <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>)
{
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">" 姓名<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>学号<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>性别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>系别<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>籍贯<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考模式<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>高考成绩<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span><span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span><span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>民族<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>专业<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭人数<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\t</span>家庭收入<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>, stu[j].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s"</span>, stu[j].score[t]);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d"</span>, stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
n <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">+</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>;
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">break</span>;
}
}
fflush(stdin);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> i) printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"查无此人!<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i)
{
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"确定删除?([Y].是/[任意键].否)"</span>);
ch <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> _getch();
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (ch <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> '<span class="hljs-type" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">Y</span>' <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> ch <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> 'y')
{
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> n; j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i; j<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)
{
stu[j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">-</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>]<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span>stu[j]; <span class="hljs-comment" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 128, 0);">//将删除的学生后续的学生信息向前移动</span>
}
memset(<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&</span>stu[i <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">-</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>], <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>, <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">95</span>); <span class="hljs-comment" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 128, 0);">//最后一个学生不可以和倒数第二个内容一致?做清除操作</span>
}
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"删除成功!"</span>);
}
fopen_s(<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">&</span>fp,<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"C:<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\\</span>Users<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\\</span>80958<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\\</span>Desktop<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\\</span>test00.txt"</span>, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"w+"</span>);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; j <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> i <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">-</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">1</span>; j<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)
{
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %s %10s %10s %s "</span>, stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">if</span> (<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">!</span>atoi(stu[j].mode)) {
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">4</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
}
<span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">else</span> <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">for</span> (int t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">0</span>; t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);"><</span> <span class="hljs-number" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(136, 0, 0);">9</span>; t<span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">++</span>)fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%s "</span>, stu[j].score[t]);
fprintf(fp, <span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"%10s %10s %d %d<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>, stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
}
fflush(stdin);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>-------------------------------------------------------------------------------<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span>"</span>);
printf(<span class="hljs-string" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">"<span class="hljs-subst" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity;">\n</span> 是否继续输入?([Y].是/[任意键].否)"</span>);
t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">=</span> _getch();
} <span class="hljs-keyword" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(0, 0, 255);">while</span> (t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> '<span class="hljs-type" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(163, 21, 21);">Y</span>' <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">||</span> t <span class="hljs-operator" style="margin: 0px; padding: 0px; transition-duration: 0.2s; transition-property: background-color, border-color, border-radius, padding-top, padding-bottom, margin-top, margin-bottom, color, opacity; color: rgb(171, 86, 86);">==</span> 'y');
fclose(fp);
}
开发环境
实现平台是VisualStudio2022,与dev c++的区别主要体现在scanf需要用scanf_s替代,gets需要用gets_s替代,还有等等之类的安全性替代,在搬运代码的时候要注意这一点。
可以继续完善之处
(1)删除功能没有规避重名的情况
(2)口令输入的时候可以被看见,如果输入的时候显示"********"就更好了
(3)可以做一个GUI界面
(4)第一个功能总是会多打出来一行然后多打两个0
实现功能
某学校学生管理部门在新生入学时,会登记每个学生的个人基本信息,以便今后提供给教务处、学生所在系部、毕业工作指导委员会等部门使用。学生信息管理系统的基本功能是实现学生信息的录入、修改、删除、查询、统计。
录入功能
能够录入八位学号(4位入学年份+1位系别+1位班级+2位班级学号)、姓名、性别、籍贯(精确到市)、高考各科成绩(有新高考和旧高考两种模式)、民族、专业、家庭收入
修改功能
能够实现对文件中任一数据的修改,并且修改需符合和录入一样的格式
删除功能
能够实现对文件中任一行数据的删除。
查询功能
- 按学号查询某个学生的基本信息;
- 按班级号查询该班全体学生的基本信息;
- 按年级查询该年级全体学生基本信息;
- 按专业查询全体学生基本信息;
统计功能
- 按班级统计高考课程各科最高、最低、平均入学成绩,以及每个人的总分;
- 按入校时间统计每个专业入学人数;
- 按给定班级号统计该班生源所属省市人数;
- 按给定年级统计不同少数民族学生人数;
- 按所学专业统计不同年级男女生人数;
- 按给定年级统计各个班级中家庭收入低于该班级全体同学家庭平均收入的学生人数。
边界检查
- 学号不能不能超过位数,入学年份也不能在在校学生入学学年范围之外,性别只能输入两种,高考模式也只有两种,高考各科成绩不能超过满分也不能负数。
- 为了防止管理系统被破坏,编辑操作必须是有特定口令的人才可以完成。查询和浏览则不用口令。
模块介绍
数据结构设计
学生信息管理系统中的信息结构是:姓名、八位学号(4位入学年份+1位系别+1位班级+2位班级学号)、性别(W、M)、系别、籍贯、高考模式、高考成绩、民族、专业、家庭人数、家庭收入
typedef struct INFO
{
char name[N]; //姓名
char num[N]; //学号
char sex[N]; //性别
char dep[N]; //系别
char province[N];//籍贯
char mode[N];//高考模式
char score[N][N]; //高考成绩
char ethnic[N];//民族
char pro[N];//专业
int familyNum; //家庭人数
int fincome; //家庭收入
float t;
} Info;
//为编辑操作设计的口令是一个长度为6的字符串。其中取值假设是”12356”
char e[6] = ”123456”;
模块设计
主要算法是实现对于文件信息的查找、修改、删除、统计。
- 增加一行新数据
将信息读入结构体数组中,遍历结构体写入文件。
- 修改某个数据
以姓名为标识符读取对应行的数据,确认需要修改的内容及其结果,重新将读取指针指向该行开头,将更改内容后的数据行写入文件。
- 删除一个已有数据
以姓名为标识符读取对应行的数据,将数据全部存到结构体数组中,并确认需要删除的行。
将删除行对应的结构体数组位置之后的数据向前移动一个单位长度,覆盖删除行的数据,重置文件读取指针到文件头,重新遍历写入结构体数组。
以上三个操作是编辑学生基本信息,对此每次选择该功能时,则要求“输入密码”,如果正确,则允许编辑,否则,则不允许。
- 查询学生基本信息
允许用学号、姓名、专业、班级查询学生信息管理系统中的学生信息。
- 统计数据公开
1.按学号查询某个学生的基本信息
2.按班级号查询该班全体学生的基本信息
3.按年级查询该年级全体学生基本信息
4.按专业查询全体学生基本信息
5.按班级查询高考成绩相关信息
6.按班级统计该班生源所属省市人数
7.按年级统计不同少数民族学生人数
8.按专业统计不同年级男女生人数
9.按年级统计各班低于平均收入的同学
10.按年级统计专业人数
(1)void Check_Information() //查看学生基本信息
void Check_Information()
{
FILE* fp;
int i = 0;
if ((fopen_s(&fp,"C:\\Users\\80958\\Desktop\\test00.txt", "r")) == NULL)
printf("打开失败!");
system("cls");
printf("\t\t********************************************\n");
printf("\t\t* *\n");
printf("\t\t* 学 生 信 息 管 理 系 统 *\n");
printf("\t\t* 查看学生基本信息 *\n");
printf("\t\t* *\n");
printf("\t\t********************************************\n");
printf("-------------------------------------------------------------------------------\n");
printf("\t姓名\t学号\t性别\t系别\t籍贯\t高考模式\t高考成绩\t 民族\t专业\t家庭人数\t家庭收入\n");
printf("-------------------------------------------------------------------------------\n");
while (!feof(fp))
{
fscanf_s(fp, "%10s %10s %s %10s %10s %s ", stu[i].name,10, stu[i].num,10, stu[i].sex,3, stu[i].dep,10, stu[i].province,10, stu[i].mode,3);
if (!atoi(stu[i].mode)) {
for (int t = 0; t < 4; t++)
fscanf_s(fp, "%s", stu[i].score[t],5);
}
else for (int t = 0; t < 9; t++)fscanf_s(fp, "%s", stu[i].score[t],5);
fscanf_s(fp, "%10s %10s %d %d", stu[i].ethnic,10, stu[i].pro,10, &stu[i].familyNum, &stu[i].fincome);
printf("%10s %10s %s %10s %10s %s ", stu[i].name, stu[i].num, stu[i].sex, stu[i].dep, stu[i].province, stu[i].mode);
if (!atoi(stu[i].mode)) {
for (int t = 0; t < 4; t++)printf("%s ", stu[i].score[t]);
}
else for (int t = 0; t < 9; t++)printf("%s ", stu[i].score[t]);
printf("%10s %10s %d %d", stu[i].ethnic, stu[i].pro, stu[i].familyNum, stu[i].fincome);
printf("\n-------------------------------------------------------------------------------\n");
i++;
}
printf("按任意键返回主菜单!");
_getch();
fclose(fp);
}
(2)void Menu_Information_Handing(); //学生基本信息处理
其中有4个case,分别为录入、修改、删除和返回菜单功能,具体操作在函数中详细介绍
(3)void Input_Information(); //录入学生信息
1、将用户输入读入结构体数组中,具有较严格边界检查;
2、遍历结构体数组将数据写入文件。
void Input_Information()
{
FILE* fp;
char t;
int i, n, m, z; int r;
char s[N];
time_t now;
struct tm e;
time(&now);
localtime_s(&e, &now);
fopen_s(&fp,"C:\\Users\\80958\\Desktop\\test00.txt", "a+");
do
{
printf("\n********************************************\n");
printf("请输入要录入的人数:");
scanf_s("%s", s,5);
getchar();
n = atoi(s);
while (n <= 0)
{
fflush(stdin);
printf("输入有误,请再次输入正确人数,或输入-1直接停止:");
scanf_s("%s", s,5);
n = atoi(s);
if (n == -1)break;
}
printf("\n 请按以下对应信息正确录入!\n");
for (i = 0; i < n; i++)
{
system("cls");
//清空输入缓冲区
printf("-------------------------------------------------------------------------------\n");
printf("请输入第%d 名学生姓名:", i + 1);
fflush(stdin);
gets_s(stu[i].name);
fflush(stdin);
printf("请输入第%d 名学生学号(8 位):", i + 1);
gets_s(stu[i].num);
while ((strlen(stu[i].num) != 8) || ((atoi(stu[i].num) / 10000) > e.tm_year + 1900)|| ((atoi(stu[i].num) / 10000) < e.tm_year + 1896))
{
printf("输入有误,请输入 8 位学号数:");
gets_s(stu[i].num);
}
fflush(stdin);
printf("请输入第%d 名学生性别([男].M/[女].W):", i + 1);
scanf_s("%s",stu[i].sex,5);
while (strcmp(stu[i].sex, "M") && strcmp(stu[i].sex, "W"))
{
fflush(stdin);
printf("输入有误,请按要求正确输入([男].M/[女].W):");
scanf_s("%s", stu[i].sex,5);
}
getchar();
printf("请输入第%d 名学生系别(1~4):", i + 1);
gets_s(stu[i].dep);
m = atoi(stu[i].dep);
while ((m == 0 || m > 4) || strlen(stu[i].dep) != 1)
{
fflush(stdin);
printf("输入有误,请按要求正确输入系别(1~4):");
gets_s(stu[i].dep);
m = atoi(stu[i].dep);
}
fflush(stdin);
printf("请输入第%d 名学生籍贯(精确到市):", i + 1);
gets_s(stu[i].province);
fflush(stdin);
printf("请输入第%d 名学生的高考模式(0_旧高考,1_新高考):", i + 1);
gets_s(stu[i].mode);
while (strcmp(stu[i].mode, "0") && strcmp(stu[i].mode, "1"))
{
fflush(stdin);
printf("输入有误,请按要求正确输入高考模式(0_旧高考,1_新高考):");
gets_s(stu[i].mode);
}
fflush(stdin);
if (!atoi(stu[i].mode)) {
printf("请输入第%d 名学生高考成绩:\n语文\t数学\t英语\t综合\n", i + 1);
for (int t = 0; t < 4; t++) {
do
{
scanf_s("%s", stu[i].score[t],20);
if((atoi(stu[i].score[t]) > 150 && t < 3) || (atoi(stu[i].score[t]) > 300 && t == 3) || (atoi(stu[i].score[t]) < 0))
printf("输入有误,请按要求正确输入第%d科成绩", t + 1);
}while((atoi(stu[i].score[t]) > 150 && t < 3) || (atoi(stu[i].score[t]) > 300 && t == 3) || (atoi(stu[i].score[t]) < 0));
}
}
else {
printf("请输入第%d 名学生高考成绩,没考的科目写零分:\n语文\t数学\t英语\t政治\t历史\t地理\t生物\t物理\t化学\n", i + 1);
do {
for (int t = 0; t < 9; t++) {
do
{
scanf_s("%s", stu[i].score[t], 20);
if ((atoi(stu[i].score[t]) > 150) || (atoi(stu[i].score[t]) < 0))
printf("输入有误,请按要求正确输入第%d科成绩", t + 1);
} while ((atoi(stu[i].score[t]) > 150) || (atoi(stu[i].score[t]) < 0));
}
z = 0;
for (int t = 0; t < 9; t++) {
z += atoi(stu[i].score[t]);
}
} while (z > 750);
}
fflush(stdin);
printf("请输入第%d 名学生民族(要写族):", i + 1);
scanf_s("%s",stu[i].ethnic,20);
fflush(stdin);
printf("请输入第%d 名学生专业(写全称):", i + 1);
scanf_s("%s", stu[i].pro,20);
fflush(stdin);
printf("请输入第%d 名学生家庭人数:", i + 1);
scanf_s("%d",&stu[i].familyNum);
fflush(stdin);
printf("请输入第%d 名学生家庭收入:", i + 1);
scanf_s("%d", &stu[i].fincome);
getchar();
fprintf(fp, "%10s %10s %s %10s %10s %s ", stu[i].name, stu[i].num, stu[i].sex, stu[i].dep,stu[i].province, stu[i].mode);
if (!atoi(stu[i].mode)) {
for (int t = 0; t < 4; t++)
fprintf(fp, "%s ", stu[i].score[t]);
}
else for (int t = 0; t < 9; t++)fprintf(fp, "%s ", stu[i].score[t]);
fprintf(fp, "%10s %10s %d %d\n", stu[i].ethnic, stu[i].pro,stu[i].familyNum, stu[i].fincome);
}
printf("-------------------------------------------------------------------------------\n");
printf("是否继续输入?([Y].是/[任意键].否)\n");
t = _getch();
} while (t == 'Y' || t == 'y');
printf("-------------------------------------------------------------------------------\n");
printf("信息已保存,按任意键返回主菜单!");
_getch();
fclose(fp);
}
(4)void Modify_Information(); //修改学生基本信息
1、以姓名为标识符遍历文件,找到对应学生
2、将对应学生的数据读入结构体,输入修改内容对待修改数据进行覆盖
3、通过fseek将文件读取指针返回本行开头
4、重新写入数据
void Modify_Information()
{
FILE* fp;
char str[N];
char t;
int i = -1, x = 0;
int j, m;
time_t now;
struct tm e;
time(&now);
localtime_s(&e, &now);
fopen_s(&fp,"C:\\Users\\80958\\Desktop\\test00.txt", "r+");
printf("-------------------------------------------------------------------------------\n");
printf("\t姓名\t学号\t性别\t系别\t籍贯\t高考模式\t高考成绩\t\t\t民族\t专业\t家庭人数\t家庭收入\n");
printf("-------------------------------------------------------------------------------\n");
while (!feof(fp))
{
i++;
fscanf_s(fp, "%10s %10s %s %10s %10s %s ", stu[i].name, 10, stu[i].num, 10, stu[i].sex, 3, stu[i].dep, 10, stu[i].province, 10, stu[i].mode, 3);
if (!atoi(stu[i].mode)) {
for (int t = 0; t < 4; t++)
fscanf_s(fp, "%s", stu[i].score[t], 5);
}
else for (int t = 0; t < 9; t++)fscanf_s(fp, "%s", stu[i].score[t], 5);
fscanf_s(fp, "%10s %10s %d %d", stu[i].ethnic, 10, stu[i].pro, 10, &stu[i].familyNum, &stu[i].fincome);
printf("%10s %10s %s %10s %10s %s ", stu[i].name, stu[i].num, stu[i].sex, stu[i].dep, stu[i].province, stu[i].mode);
if (!atoi(stu[i].mode)) {
for (int t = 0; t < 4; t++)
printf("%s", stu[i].score[t]);
}
else for (int t = 0; t < 9; t++)
printf("%s", stu[i].score[t]);
printf("%10s %10s %d %d", stu[i].ethnic, stu[i].pro, stu[i].familyNum, stu[i].fincome);
printf("\n-------------------------------------------------------------------------------\n");
}
do
{
printf("-------------------------------------------------------------------------------\n");
printf("请输入要修改信息的学生姓名:");
fflush(stdin);
scanf_s("%s",str,10);
getchar();
for (j = 0; j < (i + 1); j++)
{
if (strcmp(str, stu[j].name) == 0)
{
printf("----------------------------------------------------------------------------------------\n");
printf("\t姓名\t学号\t性别\t系别\t籍贯\t高考模式\t高考成绩\t\t\t民族\t专业\t家庭人数\t家庭收入\n");
printf("----------------------------------------------------------------------------------------\n");
printf("%10s %10s %s %10s %10s %s ", stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
if (!atoi(stu[j].mode)) {
for (int t = 0; t < 4; t++)printf("%s", stu[j].score[t]);
}
else for (int t = 0; t < 9; t++)printf("%s", stu[j].score[t]);
printf("%10s %10s %d %d", stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
printf("\n-------------------------------------------------------------------------------\n");
printf("1.姓名2.学号3.性别4.系别5.籍贯6.高考模式7.高考成绩8.民族9.专业10.家庭人数11.家庭收入\n输入要修改的信息:");
scanf_s("%d", &x);
printf("-------------------------------------------------------------------------------\n");
system("cls");
switch (x)
{
case 1:
fflush(stdin);
printf("修改该学生姓名:");
scanf_s("%10s",stu[j].name,10);
getchar();
printf("-------------------------------------------------------------------------------\n");
fseek(fp, j * 96, 0);
fprintf(fp, "%10s %10s %s %10s %10s %s ", stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
if (!atoi(stu[j].mode)) {
for (int t = 0; t < 4; t++)fprintf(fp, "%s ", stu[j].score[t]);
}
else for (int t = 0; t < 9; t++)fprintf(fp, "%s ", stu[j].score[t]);
fprintf(fp, "%10s %10s %d %d\n", stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
break;
case 2:
fflush(stdin);
printf("修改该学生学号:");
scanf_s("%10s",stu[j].num,10);
getchar();
while ((strlen(stu[j].num) != 8) || ((atoi(stu[j].num) / 10000) > e.tm_year + 1900)|| ((atoi(stu[j].num) / 10000) < e.tm_year + 1896))
{
fflush(stdin);
printf("输入有误,请输入 8 位学号数:");
scanf_s("%10s", stu[j].num, 10);
getchar();
}
printf("-------------------------------------------------------------------------------\n");
fseek(fp, j * 96, 0);
fprintf(fp, "%10s %10s %s %10s %10s %s ", stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
if (!atoi(stu[j].mode)) {
for (int t = 0; t < 4; t++)fprintf(fp, "%s ", stu[j].score[t]);
}
else for (int t = 0; t < 9; t++)fprintf(fp, "%s ", stu[j].score[t]);
fprintf(fp, "%10s %10s %d %d\n", stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
break;
case 3:
fflush(stdin);
printf("修改该学生性别:");
scanf_s("%s", stu[i].sex,3);
getchar();
while (strcmp(stu[j].sex, "M") && strcmp(stu[j].sex, "W"))
{
fflush(stdin);
printf("输入有误,请按要求正确输入([男].M/[女].W):");
scanf_s("%s", stu[i].sex,3);
}
printf("-------------------------------------------------------------------------------\n");
fseek(fp, j * 96, 0);
fprintf(fp, "%10s %10s %s %10s %10s %s ", stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
if (!atoi(stu[j].mode)) {
for (int t = 0; t < 4; t++)fprintf(fp, "%s ", stu[j].score[t]);
}
else for (int t = 0; t < 9; t++)fprintf(fp, "%s ", stu[j].score[t]);
fprintf(fp, "%10s %10s %d %d\n", stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
break;
case 4:
fflush(stdin);
printf("修改该学生系别:");
scanf_s("%s",stu[j].dep,10);
m = atoi(stu[j].dep);
while ((m == 0 || m > 4) || strlen(stu[j].dep) != 1)
{
fflush(stdin);
printf("输入有误,请按要求正确输入系别(1~4):");
scanf_s("%s", stu[j].dep, 10);
m = atoi(stu[j].dep);
}
printf("-------------------------------------------------------------------------------\n");
fseek(fp, j * 96, 0);
fprintf(fp, "%10s %10s %s %10s %10s %s ", stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
if (!atoi(stu[j].mode)) {
for (int t = 0; t < 4; t++)fprintf(fp, "%s ", stu[j].score[t]);
}
else for (int t = 0; t < 9; t++)fprintf(fp, "%s ", stu[j].score[t]);
fprintf(fp, "%10s %10s %d %d\n", stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
break;
case 5:
fflush(stdin);
printf("修改该学生籍贯:");
scanf_s("%10s",stu[j].province,10);
printf("-------------------------------------------------------------------------------\n");
fseek(fp, j * 96, 0);
fprintf(fp, "%10s %10s %s %10s %10s %s ", stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
if (!atoi(stu[j].mode)) {
for (int t = 0; t < 4; t++)fprintf(fp, "%s ", stu[j].score[t]);
}
else for (int t = 0; t < 9; t++)fprintf(fp, "%s ", stu[j].score[t]);
fprintf(fp, "%10s %10s %d %d\n", stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
break;
case 6:
fflush(stdin);
printf("修改该学生高考模式(0_旧高考1_新高考):");
scanf_s("%3s",stu[j].mode,3);
getchar();
m = atoi(stu[j].mode);
while (strcmp(stu[j].mode, "0") && strcmp(stu[j].mode, "1"))
{
fflush(stdin);
printf("输入有误,请按要求正确输入高考模式(0_旧高考,1_新高考):");
scanf_s("%3s", stu[j].mode, 3);
getchar();
m = atoi(stu[j].mode);
}
if (!atoi(stu[j].mode)) {
printf("请输入学生高考成绩,没考的科目写零分:\n语文\t数学\t英语\t综合\n");
for (int t = 0; t < 4; t++) {
do
{
scanf_s("%s",stu[j].score[t],10);
if ((atoi(stu[j].score[t]) > 150 && t < 3) || (atoi(stu[j].score[t]) > 300 && t == 3) || (atoi(stu[j].score[t]) < 0))
printf("输入有误,请按要求正确输入第%d科成绩", t + 1);
} while ((atoi(stu[j].score[t]) > 150 && t < 3) || (atoi(stu[j].score[t]) > 300 && t == 3) || (atoi(stu[j].score[t]) < 0));
}
}
else {
printf("请输入学生高考成绩,没考的科目写零分:\n语文\t数学\t英语\t政治\t历史\t地理\t生物\t物理\t化学\n");
for (int t = 0; t < 9; t++) {
do
{
scanf_s(stu[j].score[t]);
getchar();
if ((atoi(stu[j].score[t]) > 150) || (atoi(stu[j].score[t]) < 0))
printf("输入有误,请按要求正确输入第%d科成绩", t + 1);
} while ((atoi(stu[j].score[t]) > 150) || (atoi(stu[j].score[t]) < 0));
}
}
printf("-------------------------------------------------------------------------------\n");
fseek(fp, j * 96, 0);
fprintf(fp, "%10s %10s %s %10s %10s %s ", stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
if (!atoi(stu[j].mode)) {
for (int t = 0; t < 4; t++)fprintf(fp, "%s ", stu[j].score[t]);
}
else for (int t = 0; t < 9; t++)fprintf(fp, "%s ", stu[j].score[t]);
fprintf(fp, "%10s %10s %d %d\n", stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
break;
case 7:
fflush(stdin);
if (!atoi(stu[j].mode)) {
printf("请输入学生高考成绩,没考的科目写零分:\n语文\t数学\t英语\t综合\n");
for (int t = 0; t < 4; t++) {
do
{
scanf_s("%s", stu[j].score[t], 10);
if ((atoi(stu[j].score[t]) > 150 && t < 3) || (atoi(stu[j].score[t]) > 300 && t == 3) || (atoi(stu[j].score[t]) < 0))
printf("输入有误,请按要求正确输入第%d科成绩", t + 1);
} while ((atoi(stu[j].score[t]) > 150 && t < 3) || (atoi(stu[j].score[t]) > 300 && t == 3) || (atoi(stu[j].score[t]) < 0));
}
}
else {
printf("请输入学生高考成绩,没考的科目写零分:\n语文\t数学\t英语\t政治\t历史\t地理\t生物\t物理\t化学\n");
for (int t = 0; t < 9; t++) {
do
{
scanf_s(stu[j].score[t]);
getchar();
if ((atoi(stu[j].score[t]) > 150) || (atoi(stu[j].score[t]) < 0))
printf("输入有误,请按要求正确输入第%d科成绩", t + 1);
} while ((atoi(stu[j].score[t]) > 150) || (atoi(stu[j].score[t]) < 0));
}
}
printf("-------------------------------------------------------------------------------\n");
fseek(fp, j * 96, 0);
fprintf(fp, "%10s %10s %s %10s %10s %s ", stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
if (!atoi(stu[j].mode)) {
for (int t = 0; t < 4; t++)fprintf(fp, "%s ", stu[j].score[t]);
}
else for (int t = 0; t < 9; t++)fprintf(fp, "%s ", stu[j].score[t]);
fprintf(fp, "%10s %10s %d %d\n", stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
break;
case 8:
fflush(stdin);
printf("修改该学生民族:");
scanf_s("%10s",stu[j].ethnic,10);
printf("-------------------------------------------------------------------------------\n");
fseek(fp, j * 96, 0);
fprintf(fp, "%10s %10s %s %10s %10s %s ", stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
if (!atoi(stu[j].mode)) {
for (int t = 0; t < 4; t++)fprintf(fp, "%s ", stu[j].score[t]);
}
else for (int t = 0; t < 9; t++)fprintf(fp, "%s ", stu[j].score[t]);
fprintf(fp, "%10s %10s %d %d\n", stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
break;
case 9:
fflush(stdin);
printf("修改该学生专业:");
scanf_s("%10s",stu[j].pro,10);
printf("-------------------------------------------------------------------------------\n");
fseek(fp, j * 96, 0);
fprintf(fp, "%10s %10s %s %10s %10s %s ", stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
if (!atoi(stu[j].mode)) {
for (int t = 0; t < 4; t++)fprintf(fp, "%s ", stu[j].score[t]);
}
else for (int t = 0; t < 9; t++)fprintf(fp, "%s ", stu[j].score[t]);
fprintf(fp, "%10s %10s %d %d\n", stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
break;
case 10:
fflush(stdin);
printf("修改该学生家庭人数:");
scanf_s("%d",&stu[j].familyNum);
printf("-------------------------------------------------------------------------------\n");
fseek(fp, j * 96, 0);
fprintf(fp, "%10s %10s %s %10s %10s %s ", stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
if (!atoi(stu[j].mode)) {
for (int t = 0; t < 4; t++)fprintf(fp, "%s ", stu[j].score[t]);
}
else for (int t = 0; t < 9; t++)fprintf(fp, "%s ", stu[j].score[t]);
fprintf(fp, "%10s %10s %d %d\n", stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
break;
case 11:
fflush(stdin);
printf("修改该学生家庭收入:");
scanf_s("%d", &stu[j].fincome);
printf("-------------------------------------------------------------------------------\n");
fseek(fp, j * 96, 0);
fprintf(fp, "%10s %10s %s %10s %10s %s ", stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
if (!atoi(stu[j].mode)) {
for (int t = 0; t < 4; t++)fprintf(fp, "%s ", stu[j].score[t]);
}
else for (int t = 0; t < 9; t++)fprintf(fp, "%s ", stu[j].score[t]);
fprintf(fp, "%10s %10s %d %d\n", stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
break;
default:
printf("输入有误!\n");
}
break;
}
}
fflush(stdin);
if (j > i) printf("查无此人!\n");
printf("-------------------------------------------------------------------------------\n");
printf("是否继续输入?([Y].是/[任意键].否)\n");
t = _getch();
} while (t == 'Y' || t == 'y');
fclose(fp);
}
(5)void Delete_Information(); //删除学生基本信息
1、以姓名为标识符遍历文件,将数据存入结构体数组,并找到对应学生
2、将结构体数组中该学生之后的数据都向前移动一个单位长度,覆盖被删除的数据
3、遍历结构体数组将数据写入文件
void Delete_Information()
{
FILE* fp;
char str[N];
char t, ch;
int i = 0;
int j, n;
fopen_s(&fp,"C:\\Users\\80958\\Desktop\\test00.txt", "r+");
printf("--------------------------------------------------------------------------------------\n");
printf("\t姓名\t学号\t性别\t系别\t籍贯\t高考模式\t高考成绩\t\t\t民族\t专业\t家庭人数\t家庭收入\n");
printf("--------------------------------------------------------------------------------------\n");
while (!feof(fp))
{
fscanf_s(fp, "%10s %10s %s %10s %10s %s ", stu[i].name,10, stu[i].num, 10, stu[i].sex,3, stu[i].dep, 10, stu[i].province, 10, stu[i].mode,3);
if (!atoi(stu[i].mode)) {
for (int t = 0; t < 4; t++)
fscanf_s(fp, "%5s", stu[i].score[t],5);
}
else for (int t = 0; t < 9; t++)
fscanf_s(fp, "%s", stu[i].score[t],5);
fscanf_s(fp, "%10s %10s %d %d", stu[i].ethnic, 10, stu[i].pro, 10, &stu[i].familyNum, &stu[i].fincome);
printf("%10s %10s %s %10s %10s %s ", stu[i].name, stu[i].num, stu[i].sex, stu[i].dep, stu[i].province, stu[i].mode);
if (!atoi(stu[i].mode)) {
for (int t = 0; t < 4; t++)printf("%s ", stu[i].score[t]);
}
else for (int t = 0; t < 9; t++)printf("%s ", stu[i].score[t]);
printf("%10s %10s %d %d", stu[i].ethnic, stu[i].pro, stu[i].familyNum, stu[i].fincome);
printf("\n-------------------------------------------------------------------------------\n");
i++;
}
fclose(fp);
do
{
printf("-------------------------------------------------------------------------------\n");
printf("请输入要删除信息的学生姓名:");
fflush(stdin);
gets_s(str);
for (j = 0; j < i; j++)
{
if (strcmp(str, stu[j].name) == 0)
{
printf("-------------------------------------------------------------------------------\n");
printf(" 姓名\t学号\t性别\t系别\t籍贯\t高考模式\t高考成绩\t\t\t民族\t专业\t家庭人数\t家庭收入\n");
printf("-------------------------------------------------------------------------------\n");
printf("%10s %10s %s %10s %10s %s ", stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
if (!atoi(stu[j].mode)) {
for (int t = 0; t < 4; t++)printf("%s", stu[j].score[t]);
}
else for (int t = 0; t < 9; t++)printf("%s", stu[j].score[t]);
printf("%10s %10s %d %d", stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
printf("\n-------------------------------------------------------------------------------\n");
n = j + 1;
break;
}
}
fflush(stdin);
if (j == i) printf("查无此人!\n");
if (j < i)
{
printf("确定删除?([Y].是/[任意键].否)");
ch = _getch();
if (ch == 'Y' || ch == 'y')
{
for (j = n; j < i; j++)
{
stu[j - 1]=stu[j]; //将删除的学生后续的学生信息向前移动
}
memset(&stu[i - 1], 0, 95); //最后一个学生不可以和倒数第二个内容一致?做清除操作
}
printf("\n-------------------------------------------------------------------------------\n");
printf("删除成功!");
}
fopen_s(&fp,"C:\\Users\\80958\\Desktop\\test00.txt", "w+");
for (j = 0; j < i - 1; j++)
{
fprintf(fp, "%10s %10s %s %10s %10s %s ", stu[j].name, stu[j].num, stu[j].sex, stu[j].dep, stu[j].province, stu[j].mode);
if (!atoi(stu[j].mode)) {
for (int t = 0; t < 4; t++)fprintf(fp, "%s ", stu[j].score[t]);
}
else for (int t = 0; t < 9; t++)fprintf(fp, "%s ", stu[j].score[t]);
fprintf(fp, "%10s %10s %d %d\n", stu[j].ethnic, stu[j].pro, stu[j].familyNum, stu[j].fincome);
}
fflush(stdin);
printf("\n-------------------------------------------------------------------------------\n");
printf("\n 是否继续输入?([Y].是/[任意键].否)");
t = _getch();
} while (t == 'Y' || t == 'y');
fclose(fp);
}
(6)void Menu_Servefor_pub();//统计信息公开
其中有十种统计功能,前五种非常简单不再赘述,算法重复的也不分开说明。
6、按班级统计该班生源所属省市人数
A.遍历该班级同学,以字符串数组provinceALL[N]形式记录下所有存在的省市
B.另设置一个整型数组countProvince[N]存放对应省市的人数,将provinceALL[i]与countProvince[i]对应起来。设置整型局部变量temp=0,遍历文件,每当出现本次遍历还没出现过的省市时,就将省市名称复制进provinceALL[temp]并将countProvince[temp]++,temp++。;
C.输出统计结果。
贴代码如下:
case 6:
fflush(stdin);
printf("请输入查找的班级(4 位):");
gets_s(str);
while (strlen(str) != 4)
{
printf("输入有误,请输入 4 位班级:");
gets_s(str);
}
printf("\t姓名\t学号\t性别\t系别\t籍贯\t高考模式\t高考成绩\t 民族\t专业\t家庭人数\t家庭收入\n");
for (int p = 0; p < i; p++) {
clas = (atoi(stu[p].num) / 100) % 10000;
if (clas == atoi(str)) {
printf("%10s %10s %s %10s %10s %s ", stu[p].name, stu[p].num, stu[p].sex, stu[p].dep, stu[p].province, stu[p].mode);
if (!atoi(stu[p].mode)) {
for (int t = 0; t < 4; t++)printf("%s ", stu[p].score[t]);
}
else for (int t = 0; t < 9; t++)printf("%s ", stu[p].score[t]);
printf("%10s %10s %d %d\n", stu[p].ethnic, stu[p].pro, stu[p].familyNum, stu[p].fincome);
}
}
for (int p = 0; p < i; p++) {
clas = (atoi(stu[p].num) / 100) % 10000;
if (clas == atoi(str)) {
flag = 0;
for (int q = 0; q <= temp; q++) {
if (!strcmp(provinceALL[q], stu[p].province)) {
countprovince[q]++;
flag = 1;
}
}
if (flag == 0) {
strcpy_s(provinceALL[temp], stu[p].province);
countprovince[temp]++;
temp = p + 1;
}
}
}
while (countprovince[c]) {
printf("来自%s的有%d人\n", provinceALL[c], countprovince[c]);
c++;
}
printf("按任意键退出...");
_getch();
break;
按年级统计不同少数民族学生人数与第六种大部分相似,不作重复说明。
按专业统计不同年级男女生人数
A.遍历该专业同学,以整型数组numTime[N]形式记录下所有存在的年级,将年级个数赋给temp;
B.遍历temp次文件,设置整型变量boy,girl,在每次遍历的过程中记录下某年级的男生和女生人数,分别赋给numTime[1]和numTime[2];
C.输出统计结果。
贴代码如下:
fflush(stdin);
printf("请输入查找的专业:");
gets_s(str);
printf("\t姓名\t学号\t性别\t系别\t籍贯\t高考模式\t高考成绩\t 民族\t专业\t家庭人数\t家庭收入\n");
for (int p = 0; p < i; p++) {
if (!strcmp(str, stu[p].pro)) {
printf("%10s %10s %s %10s %10s %s ", stu[p].name, stu[p].num, stu[p].sex, stu[p].dep, stu[p].province, stu[p].mode);
if (!atoi(stu[p].mode)) {
for (int t = 0; t < 4; t++)printf("%s ", stu[p].score[t]);
}
else for (int t = 0; t < 9; t++)printf("%s ", stu[p].score[t]);
printf("%10s %10s %d %d\n", stu[p].ethnic, stu[p].pro, stu[p].familyNum, stu[p].fincome);
flag = 0;
for (int q = 0; q <= temp; q++) {
c = atoi(stu[p].num) / 10000;
if (numTime[q][0] == c) {
flag = 1;
}
}
if (flag == 0) {
numTime[temp][0] = c;
temp++;
}
}
}
flag = 0;
for (int p = 0; p < i; p++) {
if (!strcmp(str, stu[p].pro)) {
for (int q = 0; q < temp; q++) {
if ((atoi(stu[p].num) / 10000) == numTime[q][0]) {
if (!strcmp(stu[p].sex, "M")) {
numTime[q][1]++;
}
if (!strcmp(stu[p].sex, "W")) {
numTime[q][2]++;
}
}
}
}
}
c = 0;
while (c<temp) {
printf("%s专业%d级的男生有%d人,女生有%d人\n", str, numTime[c][0], numTime[c][1], numTime[c][2]);
c++;
}
printf("按任意键退出...");
_getch();
break;
9、按年级统计各班低于平均收入的同学
A.以处理第八种功能的方法记录下本年级所有的班级及其人数,将班级个数赋给temp;
B.遍历该年级同学,分别计算出每个班级平均收入,将每个同学和本班平均收入作比较并作计数;
C.输出统计结果。
fflush(stdin);
printf("请输入查找的年级(4 位):");
gets_s(str);
while (strlen(str) != 4)
{
printf("输入有误,请输入 4 位年份:");
gets_s(str);
}
temp = 0;
for (int p = 0; p < i; p++) {
c = atoi(stu[p].num) / 10000;
_itoa_s(c, TEMP, 10);
if (!strcmp(str,TEMP)) {
printf("%10s %10s %s %10s %10s %s ", stu[p].name, stu[p].num, stu[p].sex, stu[p].dep, stu[p].province, stu[p].mode);
if (!atoi(stu[p].mode)) {
for (int t = 0; t < 4; t++)printf("%s ", stu[p].score[t]);
}
else for (int t = 0; t < 9; t++)printf("%s ", stu[p].score[t]);
printf("%10s %10s %d %d\n", stu[p].ethnic, stu[p].pro, stu[p].familyNum, stu[p].fincome);
flag = 0;
for (int q = 0; q <= temp; q++) {
c = (atoi(stu[p].num) / 100)%10000;
if (numClas[q][0] == c) {
flag = 1;
}
}
if (flag == 0) {
numClas[temp][0] = c;
temp++;
}
}
}
flag = 0;
for (int p = 0; p < i; p++) {
flag = atoi(stu[p].num) / 10000;
_itoa_s(flag, TEMP,10);
if (!strcmp(str, TEMP)) {
for (int q = 0; q < temp; q++) {
if (((atoi(stu[p].num) / 100)%10000) == numClas[q][0]) {
numClas[q][1]++;
s_income[q] += stu[p].fincome;
}
}
}
}
c = 0; boy = 0;
while (c < temp) {
s_income[c] = s_income[c] / numClas[c][1];
for (int count = 0, q=0;q<i&& count<numClas[c][1];q++) {
if (((atoi(stu[q].num) / 100) % 10000) == numClas[c][0]) {
if (stu[q].fincome < s_income[c])boy++;
count++;
}
}
numClas[c][2] = boy;
c++;
}
c = 0;
while (c < temp) {
printf("%s级%d班有%d人家庭收入低于该班级全体同学家庭平均收入\n", str, numClas[c][0], numClas[c][2]);
c++;
}
printf("按任意键退出...");
_getch();
break;