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

正文內(nèi)容

高校水電費管理系統(tǒng)c實驗報告(編輯修改稿)

2024-08-30 07:35 本頁面
 

【文章內(nèi)容簡介】 setw(10) 水費 setw(10) 電費 endl endl。 for (int i = 0。 i amount。 i++) { if (stu[i].geteletric() == electric) { stu[i].output()。 } } return。 cout 此人不存在! endl。 }break。 default:cout 無此選項,請重試! endl。 break。 }}void Student_message::show() //學(xué)生信息顯示函數(shù){ if (amount == 0) { cout 沒有數(shù)據(jù)! endl。 return。 } cout 姓名 性別 年齡 班級 學(xué)號 setw(10) 用水量 setw(10) 用電量 setw(10) 水費 setw(10) 電費 endl endl。 for (int i = 0。 i amount。 i++) { stu[i].output()。 }}void Student_message::pile() //學(xué)生信息編輯函數(shù){ if (amount == 0) { cout 當(dāng)前沒有人員記錄! endl。 return。 } int num。 cout 請輸入要查找的編號: endl。 cin num。 for (int i = 0。 i amount。 i++) { if (stu[i].getnumber() == num) { cout 請輸入修改的信息 endl。 stu[i].input()。 cout 修改成功! endl。 return。 } } cout 查無此人! endl。}void Student_message::deletes() //學(xué)生信息刪除函數(shù){ if (amount == 0) { cout 當(dāng)前沒有人員記錄! endl。 return。 } cout 請輸入您的選擇: endl。 cout endl。 int choice。 cin choice。 switch (choice) { case 1: { cout 請輸入編號: endl。 int num。 cin num。 for (int i = 0。 i amount。 i++) { if (num == stu[i].number) { cout 是否刪除? endl。 cout endl。 int choice1。 cin choice1。 switch (choice1) { case 1: { for (int k = i。 k amount 1。 k++) stu[k] = stu[k + 1]。 cout 刪除成功! endl。 amount。 }。 break。 case 2:return。 default:cout 不存在此選項! endl。 break。 }return。 } } cout 不存在此人! endl。 }。 break。 case 2: { cout 請輸入姓名: endl。 string name。 cin name。 for (int i = 0。 i amount。 i++) { if (name == stu[i].name) { cout 是否刪除? endl。 cout endl。 int choice2。 cin choice2。 switch (choice2) { case 1: { for (int k = i。 k amount 1。 k++) stu[k] = stu[k + 1]。 cout 刪除成功! endl。 amount。 }。 break。 case 2:return。 default:cout 無此項,失??! endl。 break。 }return。 } } cout 無此人! endl。 }。 break。 default:cout 沒有此選項,失??! endl。 break。 }}void Student_message::statistics() //統(tǒng)計函數(shù){ cout endl。 int choice。 cout 請選擇您的選項: endl。 cin choice。 switch (choice) { case 1: { double all_water = , all_electric = 。 for (int i = 0。 i amount。 i++) { all_water += stu[i].water。 all_electric += stu[i].electric。 } cout 學(xué)生總用水量為: all_water endl。 cout 學(xué)生總用電量為: all_electric endl。 }break。 case 2: { double all_waterfare = , all_powerfee = 。 for (int i = 0。 i amount。 i++) { all_waterfare += stu[i].waterfee。 all_powerfee += stu[i].powerfare。 } cout 學(xué)生總水費為: all_waterfare endl。 cout 學(xué)生總電費為: all_powerfee endl。 }break。 default: cout 輸入錯誤!請重新輸入! endl。 break。 }}void Student_message::saving() //學(xué)生信息保存函數(shù){ ofstream out(, ios::out)。 if (!out) { cout 打開失??! endl。 return。 } cout 打開成功! endl。 for (int i = 0。 i amount。 i++) { out stu[i].name stu[i].sex stu[i].age stu[i].grade stu[i].number stu[i].water stu[i].electric stu[i].waterfee stu[i].powerfare endl。 } cout 寫入成功! endl。 ()。}void Student_message::reading() //學(xué)生信息讀取函數(shù){ ifstream in(, ios::in)。 if (!in) { cout 打開失??! endl。 return。 } int j = 0。 while (in stu[j].name stu[j].sex stu[j].age stu[j].grade stu[j].number stu[j].water stu[j].electric stu[j].waterfee stu[j].powerfare) { j++。 amount++。 } cout 打開成功! endl。 ()。}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////class Teacher : public College //公有繼承基類{public: //公用數(shù)據(jù)成員 Teacher(string nam = , string s = , int a = 0, int num = 0, double wat = , double ele = , double powerf = , double waterf = , string depart = ) : College(nam, s, a, num, wat, ele, powerf, waterf), department(depart){} //定義教師類構(gòu)造函數(shù) void input()。 //聲明教師類輸入函數(shù) void output()。 //聲明教師類輸出函數(shù)public: string department。}。class Teacher_message //聲明教師信息類{ Teacher teach[capacity]。 int amount。 //定義當(dāng)前數(shù)據(jù)數(shù)public: Teacher_message(){ amount = 0。 } //初始記錄數(shù)據(jù)數(shù)為0 void add()。 //聲明教師信息添加函數(shù) void search()。 //聲明教師信息查詢函數(shù) void show()。 //聲明教師信息顯示函數(shù) void pile()。 //聲明教師信息編輯函數(shù) void deletes()。 //聲明教師信息刪除函數(shù) void statistics()。 //聲明統(tǒng)計函數(shù) void saving()。 //聲明教師信息保存函數(shù) void reading()。 //聲明教師信息讀取函數(shù)}。////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void Teacher::input() //教師信息輸入函數(shù){ int choice3。 int choice4。 cout 請輸入姓名: endl。 cin name。 cout 請選擇性別(,): endl。 cin choice3。 switch (choice3) { case 1:sex = 男。 break。 cas
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1