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

正文內(nèi)容

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

2025-02-09 17:24 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 if(!in) //如果打開(kāi)文件失敗 { cout\t文件不存在!endl。 return top。 } 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ù)聲明{ 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)并制定以輸入方式打開(kāi)/如果文件不存在,則打開(kāi)文件失敗 if(!in) //判斷是否已有文件 { cout\t還沒(méi)有建文件,退出時(shí)別忘記存文件。endl。 } else { ()。 //關(guān)閉文件 if(topcount==0) //如果指針指向?qū)ο蟮腸ount等于0,那么就直接退出函數(shù) { cout\t請(qǐng)稍候,取已有文件...endl。 top=load(top)。 //函數(shù)調(diào)用 } } Student *old,*star。 //定義對(duì)象指針 ASK(star)。 //重新初始化 old=top。 //對(duì)象指針訪問(wèn)對(duì)象 while(oldnext!=NULL) { old=oldnext。 } cout\t輸入數(shù)據(jù),輸入0時(shí)結(jié)束。endl。 topcount。 do { ++topcount。 cout\t學(xué)號(hào):flush。 gets(starno)。 //從鍵盤(pán)接受學(xué)號(hào) if(strcmp(starno,0)==0) //比較字符串 break。 cout\t名字:flush。 gets(starname)。 //從鍵盤(pán)接受名字 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。 cout\endl。 cout\endl。 cout\endl。 cout\flush。 cout\t請(qǐng)選擇14:flush。 gets(choose) 。 //從鍵盤(pán)接受字符串 while(1) { =atoi(choose)。 if(1||4) { cout\t輸入錯(cuò)誤,重選14:flush。 gets(choose)。 //從鍵盤(pán)接受字符串 } else break。 } switch() { case 1: //顯示原始數(shù)據(jù) { if(topcount==0) { cout\n\t現(xiàn)在沒(méi)有記錄!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。 //輸出原始數(shù)據(jù) p=pnext。 } coutendl。 break。 } case 2: //顯示簡(jiǎn)明文件 { ifstream in。 //
點(diǎn)擊復(fù)制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1