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

正文內(nèi)容

c++學(xué)生成績管理系統(tǒng)課程設(shè)計(jì)報(bào)告-文庫吧

2025-01-02 10:33 本頁面


【正文】 ext。 return head。 } friend void OutputOne(const Student* head) //輸出一個(gè)學(xué)生數(shù)據(jù) { coutheadClass39。\t39。headname39。\t39。headnum39。\t39。 headcpp39。\t39。headmath39。\t39。 headeng39。\t39。 headorderendl。 } 。 主要代碼:friend Student *DeleteStudent(Student *head,int num) { Student *p1=head,*p2=p1。 while(p2amp。amp。p2num!=num) p1=p2,p2=p2next。 if(p2) { if(p2==p1) { head=headnext。delete p1。 } else { p1next=p2next。delete p2。 } cout已刪除num號(hào)學(xué)生數(shù)據(jù)\n。 SetOrder(head)。 }else cout沒找到指定學(xué)生!\n。 return head。 } ,排序結(jié)果為降序操作。 friend void SetOrder(Student*head) { int order=1。 while(head) {headorder=order++。head=headnext。} }5.修改學(xué)生的信息friend Student *Modify(Student *head,int num) //修改學(xué)號(hào)為學(xué)生的數(shù)據(jù) { Student *p1=head,*p2=p1。 while(p2amp。amp。p2num!=num) //尋找待修改的結(jié)點(diǎn) p1=p2,p2=p2next。 if(p2) //修改指定結(jié)點(diǎn)數(shù)據(jù) { /*cout\n\n請(qǐng)輸入新數(shù)據(jù),格式為:\n 班級(jí) 姓名 學(xué)號(hào) C++ 數(shù)學(xué) 英語 \n。 cinp2Classp2namep2nump2cppp2math p2eng。*/ cout班級(jí):endl。 cinp2Class。 cout姓名:endl。 cinp2name。 cout學(xué)號(hào):endl。 cinp2num。 coutC++的成績:endl。 cinp2cpp。 cout數(shù)學(xué)的成績:endl。 cinp2math。 cout英語的成績 :endl。 cinp2eng。 while(!Valid(p2cpp)||!Valid(p2math)||!Valid(p2eng) ) { cout\n\n成績數(shù)據(jù)非法!請(qǐng)重新輸入,格式為:\n 班級(jí) 姓名 學(xué)號(hào) C++ 數(shù)學(xué) 英語 \n。 cinp2Classp2namep2nump2cppp2math p2eng。 } p2ave=(p2cpp+p2math+p2eng)/3。 //將修改的指定結(jié)點(diǎn)從原鏈表上修改下來,并重新降序插入原鏈表 if(p2==p1) head=Insert(p2next,p2)。 else { p1next=p2next。 head=Insert(head,p2)。 } SetOrder(head)。 } else cout沒找到指定學(xué)生!\n。 return head。 } : friend void OutputAll(const Student*head) //輸出所有學(xué)生的數(shù)據(jù) { if(!head) {cout\n\n\t\t沒有任何學(xué)生數(shù)據(jù)!\n\n。 return。} cout\n\n\t\t學(xué)生成績表\n\n。 cout班級(jí)\t姓名\t學(xué)號(hào)\tC++\t數(shù)學(xué)\t英語\t名次\n。 while(head) { OutputOne(head)。head=headnext。 } } friend void Statistic(const Student *head) { int i=0。 float ave_cpp=0, ave_math=0, ave_eng=0。 while(head) { ave_cpp+=headcpp。 ave_math+=headmath。 ave_eng+=headeng。 i++。head=headnext。 } if(!i) { cout\n\n沒有任何學(xué)生數(shù)據(jù)!\n。return。} cout\n\n
點(diǎn)擊復(fù)制文檔內(nèi)容
規(guī)章制度相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1