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

正文內(nèi)容

統(tǒng)計(jì)學(xué)生成績(jī)課程設(shè)計(jì)(編輯修改稿)

2024-07-13 02:52 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 Student *p=top。 //定義對(duì)象指針 while(p!=NULL) //當(dāng) p 不為空時(shí) { out *p。 //重載 運(yùn)算符 p=pnext。 //對(duì)象訪問成員 } ()。 //關(guān)閉文件 cout39。\t39。topcount條記錄已經(jīng)存入文件,請(qǐng)繼續(xù)操 作。 endl。 } /******************* * 文件讀取操作函數(shù) *******************/ Student *Student::load(Student *top) //定義文件讀取操作函數(shù) { ifstream in。 //建立輸入流對(duì)象 (,ios::in|ios::nocreate)。//與 關(guān)聯(lián)并制定以輸入方式打 開 /如果文件不存在,則打開文件失敗 if(!in) //如果打開文件失敗 { cout\t 文件不存在 !endl。 return top。 沈陽(yáng)理工大學(xué)課程設(shè)計(jì)專用紙 No10 沈陽(yáng)理工大學(xué) } cout\n\t 取文件 ...endl。 intopcount。 ()。 Student *p=top。 Student *old。 for(int i=0。itopcount。i++) { in*p。 ASK(pnext)。 old=p。 p=pnext。 ()。 } oldnext=NULL。 ()。 //關(guān)閉文件 cout\t 取入 topcount條記錄 .endl。 return(top)。 //退出函數(shù) } /******************* * 重載 運(yùn)算符函數(shù) *******************/ istream amp。 operator (istream amp。is,Student amp。ob) //重載 運(yùn)算符函數(shù)聲明 { (,10,39。\n39。)。 //使其能夠讀入字符串中的空格 (,16,39。\n39。)。 //使其能夠讀入字符串中的空格 is。 is。 is。 return is。 //退出函數(shù) } /******************* * 重載 運(yùn)算符函數(shù) *******************/ ostream amp。 operator(ostream amp。os,Student amp。ob) //重載 運(yùn)算符函數(shù)聲明 { 沈陽(yáng)理工大學(xué)課程設(shè)計(jì)專用紙 No11 沈陽(yáng)理工大學(xué) os39。\n39。 os39。\n39。 os39。\n39。 os39。\n39。 os39。\n39。 return os。 //退出函數(shù) } include /****************** * 輸入信息函數(shù) ******************/ Student *Student::input(Student *top) //定義輸入信息函數(shù) { ifstream in。 //建立輸入流對(duì)象 (sname,ios::in|ios::nocreate)。 //與 sname 關(guān)聯(lián)并制定以輸入方式打開 /如果文件不存在,則打開文件失敗 if(!in) //判斷是否已有文件 { cout\t 還沒有建文件,退出時(shí)別忘記存文件。 endl。 } else { ()。 //關(guān)閉文件 if(topcount==0) //如果指針指向?qū)ο蟮?count 等于 0,那么就直接退出函數(shù) { cout\t 請(qǐng)稍候,取已有文件 ...endl。 top=load(top)。 //函數(shù)調(diào)用 } } Student *old,*star。 //定義對(duì)象指針 ASK(star)。 //重新初始化 old=top。 //對(duì)象指針訪問對(duì)象 while(oldnext!=NULL) 沈陽(yáng)理工大學(xué)課程設(shè)計(jì)專用紙 No12 沈陽(yáng)理工大學(xué) { old=oldnext。 } cout\t 輸入數(shù)據(jù),輸入 0 時(shí)結(jié)束。 endl。 topcount。 do { ++topcount。 cout\t 學(xué)號(hào) :flush。 gets(starno)。 //從鍵盤接受學(xué)號(hào) if(strcmp(starno,0)==0) //比較字符串 break。 cout\t 名字 :flush。 gets(starname)。 //從鍵盤接受名字 cout\t 數(shù)學(xué) :flush。 cinstarmath。 //輸入數(shù)學(xué)成績(jī) cout\t 語(yǔ)文 :flush。 cinstarchi。 //輸入語(yǔ)文成績(jī) starave=(starchi+starmath)/2。 //計(jì)算平均成績(jī) if(topcount==0) top=star。 oldnext=star。 old=star。 ASK(star)。 }while(1)。 oldnext=NULL。 return(top)。 //退出函數(shù) } /********************** * 顯示數(shù)據(jù)信息的函數(shù) **********************/ void Student::display(Student *top) //定義顯示數(shù)據(jù)信息函數(shù) { char choose[2]。//,input[30]。 int =0。 cout\t 選擇要看到的文件類型 endl。 沈陽(yáng)理工大學(xué)課程設(shè)計(jì)專用紙 No13 沈陽(yáng)理工大學(xué) cout\ endl。 cout\ endl。 cout\ endl。 cout\ flush。 cout\t 請(qǐng)選擇 14:flush。 gets(choose) 。 //從鍵盤接受字符串 while(1) { =atoi(choose)。 if(1||4) { cout\t 輸入錯(cuò)誤,重選 14: flush。 gets(choose)。 //從鍵盤接受字符串 } else break。 } switch() { case 1: //顯示原始數(shù)據(jù) { if(topcount==0) { cout\n\t 現(xiàn)在沒有記錄 !endl。 return。 } Student*p=top。 cout\n\t 現(xiàn)在共有如下 count條記錄 :\n。 cout\t 學(xué)號(hào) \t 名字 \t 數(shù)學(xué) \t 語(yǔ)文 \t 平均 \n。 while(p!=NULL) //當(dāng) p 為非 空時(shí) { cout39。\t39。pno39。\t39。pname39。\t39。 pmath39。\t39。pchi39。\t39。pave39。\n39。 //
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1