freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

學(xué)生學(xué)籍管理系統(tǒng)課程設(shè)計(jì)報(bào)告-資料下載頁

2025-03-03 02:18本頁面
  

【正文】 { int select。 /*1:按學(xué)號查, 2:按姓名查,其他:返回主界面(菜單) */ char searchinput[20]。 /*保存用戶輸入的查詢內(nèi)容 */ Node *p。 if(!lnext) /*若鏈表為空 */ { system(cls)。 printf(\n=====No student record!\n)。 getchar()。 return。 } system(cls)。 printf(\n =====1 Search by number =====2 Search by name\n)。 37 printf( please choice[1,2]:)。 scanf(%d,amp。select)。 if(select==1) /*按學(xué)號查詢 */ { stringinput(searchinput,10,Input the existing student number:)。 p=Locate(l,searchinput,num)。/*在 l 中查找學(xué)號為 searchinput 值的節(jié)點(diǎn),并返回節(jié)點(diǎn)的指針 */ if(p) /*若 p!=NULL*/ { printheader()。 printdata(p)。 printf(END)。 printf(press any key to return)。 getchar()。 } else Nofind()。 getchar()。 } else if(select==2) /*按姓名查詢 */ { stringinput(searchinput,15,input the existing student name:)。 p=Locate(l,searchinput,name)。 if(p) { printheader()。 printdata(p)。 printf(END)。 printf(press any key to return)。 getchar()。 } else Nofind()。 getchar()。 } else Wrong()。 getchar()。 } void Del(Link l) /*刪除學(xué)生記錄:先找到保存該學(xué)生記錄的節(jié)點(diǎn),然后刪除該節(jié)點(diǎn) */ { int sel。 Node *p,*r。 38 char findmess[20]。 if(!lnext) { system(cls)。 printf(\n=====No student record!\n)。 getchar()。 return。 } system(cls)。 Disp(l)。 printf(\n =====1 Delete by number =====2 Delete by name\n)。 printf( please choice[1,2]:)。 scanf(%d,amp。sel)。 if(sel==1) { stringinput(findmess,10,input the existing student number:)。 p=Locate(l,findmess,num)。 if(p) /*p!=NULL*/ { r=l。 while(rnext!=p) r=rnext。 rnext=pnext。/*將 p 所指節(jié)點(diǎn)從鏈表中去除 */ free(p)。 /*釋放內(nèi)存空間 */ printf(\n=====Delete success!\n)。 getchar()。 saveflag=1。 } else Nofind()。 getchar()。 } else if(sel==2) { stringinput(findmess,15,input the existing student name)。 p=Locate(l,findmess,name)。 /*先按姓名查詢到該記錄所在的節(jié)點(diǎn) */ if(p) { r=l。 while(rnext!=p) r=rnext。 rnext=pnext。 free(p)。 printf(\n=====Delete success!\n)。 39 getchar()。 saveflag=1。 } else Nofind()。 getchar()。 } else Wrong()。 getchar()。 } void Modify(Link l) /*修改學(xué)生記錄。先按輸入的學(xué)號查詢到該記錄,然后提示用戶修改學(xué)號之外的值,學(xué)號不能修改 */ { Node *p。 char findmess[20]。 if(!lnext) { system(cls)。 printf(\n=====No student record!\n)。 getchar()。 return。 } system(cls)。 printf(Modify student recorder:)。 Disp(l)。 stringinput(findmess,10,\nInput the existing student number:)。 /*輸入并檢驗(yàn)該學(xué)號 */ p=Locate(l,findmess,num)。 /*查詢到該節(jié)點(diǎn) */ if(p) /*若 p!=NULL,表明已經(jīng)找到該節(jié)點(diǎn) */ { printf(Number:%s,\n,p)。 printf(Name:%s,p)。 stringinput(p,15,input new name:)。 printf(C language score:%d,p)。 p=numberinput(C language Score[0100]:)。 printf(Math score:%d,p)。 p=numberinput(Math Score[0100]:)。 printf(English score:%d,p)。 40 p=numberinput(English Score[0100]:)。 p = p + p + p。 p=(float)(p)。 p=0。 printf(\n=====Modify success!\n)。 Disp(l)。 saveflag=1。 } else Nofind()。 getchar()。 } void Insert(Link l) /*插入記錄 ,按學(xué)號查詢到要插入的節(jié)點(diǎn)的位置 ,然后在該學(xué)號之后插入一個新節(jié)點(diǎn) */ { Link p,v,newinfo。 /*p 指向插入位置, newinfo 指新插入記錄 */ char ch,num[10],s[10]。 /*s[]保存插入點(diǎn)位置之前的學(xué)號 ,num[]保存輸入的新記錄的學(xué)號 */ int flag=0。 v=lnext。 system(cls)。 Disp(l)。 while(1) { stringinput(s,10,\nPlease input Insert location after the Number:)。 flag=0。 v=lnext。 while(v) /*查詢該學(xué)號是否存在, flag=1 表示該學(xué)號存在 */ { if(strcmp(v,s)==0) {flag=1。break。} v=vnext。 } if(flag==1) break。 /*若學(xué)號存在,則進(jìn)行插入之前的新記錄的輸入操作 */ else { getchar()。 printf(\n=====The number %s is not existing,try again?(y/n):,s)。 scanf(%c,amp。ch)。 if(ch==39。y39。||ch==39。Y39。) continue。 41 else return。 } } stringinput(num,10,Input new student Number:)。 /*以新記錄的輸入操作與 Add()相同 */ v=lnext。 while(v) { if(strcmp(v,num)==0) { printf(=====Sorry,the new number:39。%s39。 is existing !\n,num)。 printheader()。 printdata(v)。 printf(\n)。 getchar()。 return。 } v=vnext。 } newinfo=(Node *)malloc(sizeof(Node))。 if(!newinfo) { printf(\n Allocate memory failure )。 /*如沒有申請到,打印提示信息 */ return 。 /*返回主界面 */ } strcpy(newinfo,num)。 stringinput(newinfo,15,Name:)。 newinfo=numberinput(C language Score[0100]:)。 newinfo=numberinput(Math Score[0100]:)。 newinfo=numberinput(English Score[0100]:)。 newinfo=newinfo+newinfo+newinfo。 newinfo=(float)(newinfo)。 newinfo=0。 newinfonext=NULL。 saveflag=1。 p=lnext。 /
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1