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

正文內(nèi)容

c++課程設(shè)計(jì)--c++程序設(shè)計(jì)語(yǔ)言-預(yù)覽頁(yè)

 

【正文】 供選擇 以上每一個(gè)函數(shù)的形參都是一個(gè)類對(duì)象,因?yàn)槭怯言瘮?shù),故可以訪問類的數(shù)據(jù)成員。t open!endl。 myFilecountendlendl。 } ()。即先找到需要?jiǎng)h除的學(xué)生的學(xué)號(hào),然后將其所有的信息全部替換成后面一位同學(xué)的信息,也就是說該同學(xué)的信息全部被覆蓋掉,這樣在查詢的時(shí)候,此學(xué)生已經(jīng)不再存在。//讀取學(xué)生數(shù)據(jù) int i=0,j。n39。N39。amp。 jn1。 stud[j].math=stud[j+1].math。 } cout====提示:已成功刪除! endl。 } Write(stud,n)。 float s。 for(i=0。 j++) if(stud[j].averagestud[j+1].average)//采用冒泡法比較大小,即相鄰兩個(gè)數(shù)比較,把大的放在前面 { strcpy(t,stud[j+1].class_0)。//交換學(xué)號(hào) stud[j+1].num=stud[j].num。 strcpy(stud[j].name,t)。 s=stud[j+1].c_program。//交換英語(yǔ)成績(jī) stud[j+1].english=stud[j].english。 stud[j].average=s。 for(i=0。 } Write(stud,n)。 全部都已經(jīng)顯示出來。經(jīng)歷這次教訓(xùn),我想會(huì)對(duì)我以后的計(jì)算機(jī)語(yǔ)言學(xué)習(xí)起到一定的幫助。 class Stu { //把對(duì)類的私有成員的處理函數(shù)全部定義為友元函數(shù) public: friend void Input(Stu stud[]) 。 //學(xué)生成績(jī)修改函數(shù) friend void Delete(Stu stud[]) 。 //學(xué)生成績(jī)插入函數(shù) friend void Write(Stu stud[],int n)。 [中南大學(xué) ] | 高級(jí)程序設(shè)計(jì)實(shí)踐 21 21 / 44 int num。 float english。 void Write(Stu stud[],int n) //文件寫入函數(shù) { fstream myFile。 //abort()。 for(int i=0。 } int Read(Stu stud[]) //文件讀取函數(shù) { fstream myFile。 //abort()。 myFilecount。 } ()。 int flag。n39。N39。 cinstud[i].num。endl。 do //學(xué)生信息錄入循環(huán) { flag=0。 else flag=1。 cinstud[i].c_program。 do { flag=0。 else flag=1。 cout====提示:是否繼續(xù)寫入學(xué)生成績(jī) ?(Y/N)。 //調(diào)用文件寫入函數(shù),把信息寫入文件 } void Statistic(Stu stud[]) //學(xué)生成績(jī)數(shù)據(jù)輸出函數(shù) { system(cls)。 for(int i=0。 } void Lookup(Stu stud[]) //學(xué)生成績(jī)查找函數(shù) { system(cls)。 coutendl==== 查找學(xué)生成績(jī) ====endl。amp。 cout班級(jí) :stud[i].class_0endl。 coutC++程序設(shè)計(jì) :stud[i].c_programendl。 int n=Read(stud)。 cout請(qǐng)輸入需要修改成績(jī)學(xué)生的學(xué)號(hào) :endl。in) i++。 coutendl。 cinstud[i].class_0。 cinstud[i].name。 cinstud[i].c_program。 cout平均分為: stud[i].averageendl。 if(c!=39。c!=39。 int s。 coutendl==== 刪除學(xué)生成績(jī) ====endl。amp。 cins。//這種結(jié)構(gòu)形式?jīng)Q定一次只能刪除一個(gè)學(xué)生 if(i==n) { cout====提示:對(duì)不起,無(wú)法找到該學(xué)生…… endl。//用后面一個(gè)學(xué)生的信息取代要?jiǎng)h除的學(xué)生信息,這樣原學(xué)生就已經(jīng)消失 stud[j].num=stud[j+1].num。 stud[j].english=stud[j+1].english。 cout====提示:是否繼續(xù)刪除學(xué)生信息?( Y/N) 。 int n=Read(stud)。n39。N39。 cinstud[n].num。 cinstud[n].math。 cinstud[n].english。 cout=====提示:插入成功! endl。 } void Sort(Stu stud[]) //學(xué)生成績(jī)排序函數(shù) { system(cls)。 coutendl==== 降序排序成績(jī) ====endl。 i++) for(j=0。 strcpy(stud[j].class_0,t)。 strcpy(t,stud[j+1].name)。//交換數(shù)學(xué)成績(jī) stud[j+1].math=stud[j].math。 stud[j].c_program=s。 s=stud[j+1].average。 cout 班級(jí) \t 學(xué)號(hào) \t 姓名 \t 高數(shù)\tC++\t 英語(yǔ) \t 平均分 \t 名次endl。 i++) { stud[i].order=i+1。 int n=Read(stud)。 cout班級(jí) \t學(xué)號(hào) \t姓名 \t高數(shù)\tc++\t英語(yǔ) \t平均分 endl。 i++) { coutstud[i].class_0\t stud[i].num\t stud[i].name\t stud[i].math \tstud[i].c_program\t stud[i].english\tstud[i].averageendl。 coutendl====部分不及格學(xué)生信息顯示如下 ====endl。in。 [中南大學(xué) ] | 高級(jí)程序設(shè)計(jì)實(shí)踐 39 39 / 44 if(stud[i].math60) { cout高等數(shù)學(xué) :stud[i].mathendl。 } } } int menu() //主菜單函數(shù) { char c。 cout┃ ********** ★★★★★ ★★★★★★★ ★★★★★ *********** ┃ 。 cout┃ ****************★ ☆ 成績(jī) ☆ ★ ****************┃ 。 cout┃ ****************★ ☆ 平均分降序排列 ☆ ★ ****************┃ 。 cout┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ 。039。 return(c39。 for(。 break。 break。 break。 break。 break。 break。 break。 break。 exit(1
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1