高校最低录取分数线的查询问题描述:现要开发一个开放式的高校本科招生最低录取分数线的查询系统,供师生和学生家长等查询,高校自愿放入该校的信息,可能随时有高校加入。功能要求:要求实现的查询功能有:(1)查询等于用户给定分数的高校;(2)查询大于(或小于)用户给定分数的高校;(3)查询最低录取分数线在用户给定的分数段中的高校。(注:为了省下打字的工夫,函数功能相似的都压缩到了一起,所以个别函数会显得烦琐!)/***************头文件***************/#include"stdio.h"#include"windows.h"#defineOK1#defineERROR0typedefstructnode//学校名称{charSchoolName[10],SchoolNum[5];structnode*next;}SchoolList;typedefstruct//录取分数对应的学校{intPassMark;SchoolListA;}PassMark_Info;typedefstructNode//二叉树节点定义{PassMark_Infodata;structNode*lchild,*rchild;}Btree,*QBtree;voidxy(intx,inty){COORDc;c.X=x-1;c.Y=y-1;SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),c);}/**************保存文件******************/voidInOrder_(QBtreebt,FILE*fp){if(bt!=NULL){InOrder_(bt->lchild,fp);fprintf(fp,"%s\t%s\t%d\t",bt->data.A.SchoolNum,bt->data.A.SchoolName,bt->data.PassMark);InOrder_(bt->rchild,fp);}}intSaveFiles(QBtreebt){FILE*fp;if((fp=fopen("passmark","wb"))==NULL){printf("\tERROR...");return0;}elseInOrder_(bt,fp);fclose(fp);returnOK;}/*************************************/voidPrint(QBtreebt)//输出{SchoolList*p=&(bt->data.A);while(p){printf("%10s\t%10s\t%10d\n",p->SchoolNum,p->SchoolName,bt->data.PassMark);p=p->next;}}voidInOrder(QBtreebt,intPassMark,intPassMark_,intk){if(bt!=NULL){InOrder(bt->lchild,PassMark,PassMark_,k);{if((k==1&&bt->data.PassMark<=PassMark)||(k==2&&bt->data.PassMark>=PassMark)||(k==0&&PassMark<=bt->data.PassMark&&bt->data.PassMark<=PassMark_))//printf("%10s\t%10s\t%10d\n",bt->data.A.SchoolNum,bt->data.A.SchoolName,bt->data.PassMark);Print(bt);}InOrder(bt->rchild,PassMark,PassMark_,k);}}Btree*Search(QBtreebt,intPassMark){if((bt==NULL)||(bt->data.PassMark==PassMark))returnbt;elseif(bt->data.PassMark>PassMark)returnSearch(bt->lchild,PassMark);elsereturnSearch(bt->rchild,PassMark);}Btree*Bt_Insert(QBtree*bt,FILE*fp){Btree*p,*pre,*q;q=(Btree*)malloc(sizeof(Btree));if(q!=NULL){if(fp==NULL){puts("请输入高校名称、学校代码和最低录取分数线:");scanf("%s%s%d",q->data.A.SchoolName,q->data.A.SchoolNum,&q->data.PassMark);}elsefscanf(fp,"%s\t%s\t%d\t",q->data.A.SchoolNum,q->data.A.SchoolName,&q->data.PassMark);q->lchild=q->rchild=NULL;q->data.A.next=NULL;}if(*bt==NULL){*bt=q;return*bt;}p=*bt;while(p!=NULL){pre=p;if(p->data.PassMark>q->data.PassMark)p=p->lchild;elsep=p->rchild;}if(pre->data.PassMark>q->data.PassMark)pre->lchild=q;elseif(pre->data.PassMark<q->data.PassMark)pre->rchild=q;elsepre->data.A.next=&(q->data.A);returnq;}/**************读取文件****************/intReadFiles(QBtree*bt){FILE*fp;if((fp=fopen("passmark","rb"))==NULL){printf("\tERROR...");return0;}elsewhile(!feof(fp))Bt_Insert(bt,fp);fclose(fp);return1;}/***************************************/voidhelp(){printf("\n\n\t不好意思暂时没什么能帮助你的!");system("pause");}intMenu(){inti;system("cls");printf("\n");printf("高校最低录取分数线查询系统菜单\n");printf("┌──────────────────┬───────────────────┐");printf("│1:按考生分数查询│2:按分数线查询│");printf("├──────────────────┼───────────────────┤");printf("│3:按分数段查询│4:添加高校信息│");printf("├──────...