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

正文內(nèi)容

學生成績管理系統(tǒng)---課程設計(參考版)

2025-07-27 18:51本頁面
  

【正文】 }return(l)。printf(“總分最高分:%.1f”,max)。printf(“英語平均分:%.1f”,ave3)。printf(“計算機平均分:%.1f”,ave1)。ave3=sum3/y。}ave1=sum1/y。if(maxsum) max=sum。sum4=sum4+pyuwen。sum2=sum2+pmgrade。ave=sum/4。 if(l==NULL){ printf(“沒有任何學生資料!”); return(l)。 int y=0,i=0。其部分代碼如下void statistics(Link l)/*在Tongji( )函數(shù)中新增加單科平均分和總分最低分*/{ floatsum,sum1=0,sum2=0,sum3=0,sum4=0,ave,ave1==0,ave3=0,ave4=0,max=0,min=0?,F(xiàn)在將部分新增功能的思路及代碼描述如下: 在Tongji( )函數(shù)中,將將整形變量countc,countm,counte和county換成指針,用以記錄不及格學生的地址,打印時,按記錄的地址找出不及格學生的名單。最后,讓我有些遺憾的是沒能在規(guī)定時間內(nèi)完成任務中的新功能。其實,只要將源代碼的每一段都理解透徹,添加新功能時認真謹慎、考慮周全,很多問題都可以避免了。當我在源代碼中加入語文成績時,由于系統(tǒng)過于復雜,總會使運行結果出現(xiàn)亂碼。首先,當我把源代碼修改正確使之能夠正常運行時,當意料之中的運行結果出現(xiàn)在眼前的屏幕上時,我感到很有成就感。這里有3條記錄已經(jīng)存儲至磁盤數(shù)據(jù)文件中。其排序結果如圖所示,有排序前和排序后的學生記錄輸出結果。其統(tǒng)計結果如圖所示,統(tǒng)計出了最高分及不及格人數(shù)。插入過程如圖所示,這里在學號為01的記錄后面插入了一條學號為02的記錄。其修改過程如圖所示,將學號04的記錄的C語言成績修改成了90分。5) 查找記錄當用戶輸入3并按enter鍵后,即可進入記錄查找界面,其查找記錄過程如圖所示,可按學號獲姓名進行查找。4) 刪除記錄當用戶輸入2并按enter鍵后,即可進入刪除界面。其輸入記錄過程如圖所示,這里輸入了三條學生記錄,當用戶輸入0的學號時,它會結束輸入過程,返回到主菜單界面。當輸入為零時,退出此管理系統(tǒng)。此時,系統(tǒng)已經(jīng)將“c:student”文件打開,若文件不為空,則將數(shù)據(jù)從文件中逐條記錄讀出,并寫入單鏈表中。break。 /*顯示學生記錄*/ default: Wrong()。Disp(l)。break。break。break。break。break。break。break。break。 break。 } printf(=====thank you for useness!)。Y39。y39。ch)。 printf(\n=====Whether save the modified record to file?(y/n):)。select)。 printf(\n Please Enter your choice(0~9):)。 menu()。 menu()。 } } fclose(fp)。 r=p。 /*退出*/ } if(fread(p,sizeof(Node),1,fp)==1) /*一次從文件中讀取一條學生成績記錄*/ { pnext=NULL。 if(!p) { printf( memory malloc failure!\n)。 exit(0)。 fp=fopen(C:\\student,ab+)。 /*返回主界面*/ } lnext=NULL。 if(!l) { printf(\n allocate memory failure )。 /*保存文件中的記錄條數(shù)(或結點個數(shù))*/ Node *p,*r。 /*保存選擇結果變量*/ char ch。 /*定義鏈表*/ FILE *fp。 } fclose(fp)。 printf(the current link is empty,no student record is saved!\n)。 saveflag=0。s record number is:%d\n,count)。 } if(count0) { getchar()。 count++。 } p=lnext。 getchar()。 fp=fopen(c:\\student,wb)。 Node *p。 printf(\n =====sort plete!\n)。 /*指針后移*/ } Disp(l)。 /*結點序號*/ p=i。 /*ll中存儲是的已排序的鏈表的頭指針*/ p=lnext。 } p=pnext。 else /*否則將該節(jié)點插入至第一個總分字段比它小的節(jié)點的前面*/ { snext=rrnext。 rrnext=p) { rr=rrnext。 while(rrnext!=NULL amp。 /*填數(shù)據(jù)域*/ snext=NULL。 /*如沒有申請到,打印提示信息*/ return 。 while(p) /*p!=NULL*/ { s=(Node*)malloc(sizeof(Node))。 Disp(l)。 /*返回主界面*/ } llnext=NULL。 /*用于創(chuàng)建新的節(jié)點*/ if(!ll) { printf(\n allocate memory failure )。 return 。 printf(\n=====Not student record!\n)。 int i=0。}/*利用插入排序法實現(xiàn)單鏈表的按總分字段的降序排序,從高到低*/void Sort(Link l){ Link ll。 printf(\n\npress any key to return)。 printf(The highest student by C score name:%s totoal score:%d\n,pc,pc)。 printf(The highest student by English score name:%s totoal score:%d\n,pe,pe)。 printf(\n)。 printf(English 60:%d (ren)\n,counte)。 printf(C Language60:%d (ren),\n,countc)。 r=rnext。 if(r=pk) pk=r。 if(r=pm) pm=r。 printf(name:%s yuw score:%d 不及格\n,p4,p4)。} if(r60) {county++。p3=r。 printf(name:%s math score:%d 不及格\n,p2,p2)。} if(r60) {countm++。p1=r。 pm=pe=pc=pt=pk=p1=p2=p3=p4=r。 } system(cls)。 getchar()。 /*保存四門成績中不及格的人數(shù)*/ if(!r) { system(cls)。 /*用于指向分數(shù)最高的節(jié)點*/ Node *r=lnext。 getchar()。 } Disp(l)。 break。 while(1) { if(strcmp(p,s)==0) /*在鏈表中插入一個節(jié)點*/ { newinfonext=pnext。 saveflag=1。 newinfo=0。 newinfo=newinfo+newinfo+newinfo+newinfo。 newinfo=numberinput(English Score[0100]:)。 newinfo=numberinput(C language Score[0100]:)。 /*返回主界面*/ } strcpy(newinfo,num)。 if(!newinfo) { printf(\n allocate memory failure )。 } v=vnext。 getchar()。 printdata(v)。 is existing !\n,num)。 while(v) { if(strcmp(v,num)==0) { printf(=====Sorry,the new number:39。} } } /*以下新記錄的輸入操作與Add()相同*/ stringinput(num,10,input new student Number:)。) {continue。||ch==39。 if(ch==39。 scanf(%c,amp。 /*若學號存在,則進行插入之前的新記錄的輸入操作*/ else { getchar()。} v=vnext。 while(v) /*查詢該學號是否存在,flag=1表示該學號存在*/ { if(strcmp(v,s)==0) {flag=1。 flag=0。 Disp(l)。 v=lnext。 /*p指向插入位置,newinfo指新插入記錄*/ char ch,num[10],s[10]。}/*插入記錄:按學號查詢到要插入的節(jié)點的位置,然后在該學號之后插入一個新節(jié)點。 } else Nofind()。 Disp(l)。 p=0。 p=p+p+p+p。 printf(yuw score:%d,p)。 printf(English score:%d,p)。 printf(Math score:%d,p)。 printf(C language score:%d,p)。 printf(Name:%s,p)。 /*輸入并檢驗該學號*/ p=Locate(l,findmess,num)。 Disp(l)。 } system(cls)。 getchar()。 if(!lnext) { system(cls)。先按輸入的學號查詢到該記錄,然后提示用戶修改學號之外的值,學號不能修改*/void Modify(Link l){ Node *p。 getchar()。 getchar()。 saveflag=1。 printf(\n=====delete success!\n)。 rnext=pnext。 if(p) { r=l。 } else if(sel==2) /*先按姓名查詢到該記錄所在的節(jié)點*/ { stringinput(findmess,15,input th
點擊復制文檔內(nèi)容
電大資料相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1