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

正文內容

c語言學生管理系統(tǒng)實驗設計報告(編輯修改稿)

2025-06-09 18:09 本頁面
 

【文章內容簡介】 /*插入學生記錄,保存在study中*/printf(Num:)。scanf(%ld,amp。p0no)。printf(Name:)。scanf(%c,p0name)。gets(p0name)。printf(Sex(m/f):)。scanf(%c,amp。p0sex)。printf(Age:)。scanf(%d,amp。p0age)。printf(Math:)。scanf(%d,amp。p0score[0])。printf(English:)。scanf(%d,amp。p0score[1])。printf(Physics:)。scanf(%d,amp。p0score[2])。printf(History:)。scanf(%d,amp。p0score[3])。printf(Num:%ld Name:%s Sex:%c Age:%d Record: Math:%d,English:%d,Physics%d,History:%d\n,p0no,p0name,p0sex,p0age,p0score[0],p0score[1],p0score[2],p0score[3])。if(head==NULL){ head=p0。p0next=NULL。 }else{while((p0nop1no)amp。amp。(p1next!=NULL)) /*按Num升序插入*/{p2=p1。p1=p1next。}if(p0no=p1no){if(head==p1) head=p0。else p2next=p0。p0next=p1。}else{p1next=p0。p0next=NULL。}}n=n+1。}void search_record() /*根據(jù)學生學號,查找學生記錄*/{student *p。long number。p=head。if(head==NULL){printf(\n****Enterlist is empty!****\n)。return。}else{printf(Please input the Num you want to search:)。scanf(%ld,amp。number)。}while(pno!=numberamp。amp。pnext!=NULL)p=pnext。if(pno==number){printf(\n************* found it *****************\n)。printf(Num:%ld Name:%s Sex:%c Age:%d Record:Math:%d,English:%d,Physics:%d,History:%d\n,pno,pname,psex,page,pscore[0],pscore[1],pscore[2],pscore[3])。 /*查找完成后顯示*/}else printf(%ld can39。t be found\n,number)。}void delete_a_record(){student *p1,*p2。long no。if(head==NULL){printf(\nEnterlist is empty!\n)。return。}printf(Please input the Num you want to delete:)。 /*輸入要刪去記錄的學生學號*/scanf(%ld,amp。no)。p1=head。while(no!=p1noamp。amp。p1next!=NULL) /*與鏈表中的學生學號依次比較*/{p2=p1。p1=p1next。}if(no==p1no) /*找到了,將該節(jié)點刪去*/{if(p1==head)head=p1next。else p2next=p1next。printf(has delete:%ld\n,no)。n=n1。}else printf(%ld not been found!\n,no)。 /*找不到,提示*/}void print_list(){student *p。printf(There are %d records\n,n)。p=head。if(head!=NULL)do{printf( Student: Num:%5ld Name:%10s Sex:%c Age:%d\n,pno,pname,psex,page)。printf( Record: Math:%5d English:%10d Physics:%d History:%d\n,pscore[0],pscore[1],pscore[2],pscore[3])。printf(\n)。p=pnext。} while(p!=NULL)。}void pute_the_score() /*整理學生成績*/{int i,j,m,k=0。float thesum=0。student *a[TOTALSTU]。student *p0,*p 。p0=head。 /* 用指針P0調用動態(tài)鏈表 */while(p0!=NULL) /*計算各節(jié)點總分及平均成績*/{thesum=0。for(j=0。j4。j++)thesum +=p0score[j]。p0sum=thesum。p0average=(float)(p0sum)/4。p0=p0next。}p0=head。while(p0!=NULL) /*將動態(tài)鏈表各節(jié)點地址賦給指針數(shù)組 */{a[k++]=p0。p0=p0next。}m=k。a[k]=NULL。for(i=0。im1。i++) /*冒泡法排序,使各節(jié)點按總分降序排列 */for(j=0。jm1i。j++)if((*a[j]).sum(*a[j+1]).sum){p=a[j]。a[j]=a[j+1]。a[j+1]=p。}
點擊復制文檔內容
醫(yī)療健康相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1