版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、#include<iostream>#include<>#include<>#include<># define INIT_SIZE 10# define INCRE_SIZE 10# define SUBJECT_NUM 3# define LEN 3void show_Start();void show_Table();void addRecord();void Info_delete();void deleteRecord();void delete_Num(int);void delete_Name(char tarName);void
2、Info_modify();void modifyRecord();void modify_Num(int);void modify_Name(char);void Info_query();void queryRecord();void query_Num(int);void query_Name(char);void display();void quit();void menu_CMD();char *subjectSUBJECT_NUM = struct STUDENTint num;char name20;char sex;float scoreSUBJECT_NUM;um = 10
3、01;strcpy(,"Jason");record1.sex = 'M'record1.score0 = ;record1.score1 = ;record1.score2 = ;record2.num = 1002;strcpy(,"Jerry");record2.sex = 'M'record2.score0 = ;record2.score1 = ;record2.score2 = ;record3.num = 1003;strcpy(,&qu
4、ot;Jessie");record3.sex = 'F'record3.score0 = ;record3.score1 = ;record3.score2 = ;*/*Info_modify();int key;cout<cin>>key;if(key = 1)int targetNum;coutcin>>targetNum;modify_Num(targetNum);cout<<endl;display();if(key = 2)char targetName20;cout<cin>>targetNam
5、e;modify_Name(targetName);cout<<endl;display();if(key = 3)exit(0);*/show_Start();menu_CMD();return 0; void show_Start() void show_Table()cout«"cout«"t"«subject0«"t"«subject1«"t"«subject2; cout«endl;)void menu_CMD()(int
6、key;while(1)(cout«"1.«endl;cout«"2.«endl;cout«"3.«endl;cout«"4.«endl;cout«"5.«endl;cout«"6.«endl;cout«"cin»key;while(1)(if(key < 1)|(key > 6)(int key;cout«"«endl;cout«(1
7、 - 5):cin»key;)else(break;)switch (key)addRecord();break;case 1:deleteRecord();break;case 2:modifyRecord();break;case 3:queryRecord();break;case 4:display();break;case 5:quit();break;um;cout<<": "cin>>recordstuN;cout<<"(M , F) : "cin>>recordstu
8、Num.sex;int i;for(i = 0;i < SUBJECT_NUM;i+)cout<<""<<subjecti<<cin>>recordstuNum.scorei;if(choi = 'N')|(choi = 'n') cout<<"<<endl;cout<<endl;)cout<<<<stuNum<<"!"<<endl;cout<<endl; )&qu
9、ot;<<endl;cout<<"2.<<endl;cout<<"3."<<endl;)um = tarNum)(if(i = stuNum)(cout<<": "<<endl;show_Table();cout<<recordi.num<<"t"<<<<"t"<<recordi.sex<<"t" <&
10、lt;recordi.score0<<recordi.score1<<"t"<<recordi.score2;cout<<endl;cout<<endl<<": "<<endl;show_Table();for(int i = 1;i <= stuNum - 1;i+)(cout<<recordi.num<<"t"<<<<"t"<<record
11、i.sex;for(int j = 0;j < SUBJECT_NUM;j+)(cout<<"t"<<recordi.scorej;)cout<<endl;)/*stuNum-;cout<<"<<stuNum<<"cout<<endl;*/)if(i != stuNum)(cout<<": "<<endl;show_Table();cout<<recordi.num<<"t"&l
12、t;<<<"t"<<recordi.sex<<"t"<<recordi.score0<<"t"<<recordi.score1<<"t"<<recordi.score2;for(int j = i+1;j <= stuNum;j+)(recordj-1 = recordj;)um<<"t"<<<<"
13、;t"<<recordi.sex;for(int j = 0;j < SUBJECT_NUM;j+)(cout<<"t"<<recordi.scorej;)cout<<endl;)/*stuNum-;cout<<""<<stuNum<<"cout<<endl;*/)stuNum-;cout<<""<<stuNum<<cout<<endl;)/*ame,tarName)
14、 = 0)(um<<"t"<<<<"t"<<recordi.sex<<"t"<<recordi.score0<<recordi.score1<<"t"<<recordi.score2;cout<<endl;cout<<endl<<" : "<<endl;show_Table();for(int i = 1;i <
15、= stuNum - 1;i+)(cout<<recordi.num<<"t"<<<<"t"<<recordi.sex;for(int j = 0;j < SUBJECT_NUM;j+)(cout<<"t"<<recordi.scorej;)cout<<endl;)/if(i != stuNum)(cout<<" : "<<endl;show_Table();cout
16、<<recordi.num<<"t"<<<<"t"<<recordi.sex<<"t"<<recordi.score0<<"t"<<recordi.score1<<"t"<<recordi.score2;um<<"t"<<<<"t"<&l
17、t;recordi.sex;for(int j = 0;j < SUBJECT_NUM;j+)(cout<<"t"<<recordi.scorej;)cout<<endl;)cout<<endl;) void delete_Name(char tarName) (int i;for(i = 1;i <= stuNum;i+)(ame,tarName) = 0)(if(i = stuNum)(cout<<" : "<<endl;show_Table();cout<&l
18、t;recordi.num<<"t"<<<<"t"<<recordi.sex<<"t"<<recordi.score0<<"t"<<recordi.score1<<"t"<<recordi.score2;cout<<endl;cout<<" : "<<endl;show_Table();for(in
19、t i = 1;i <= stuNum-1;i+)(cout<<recordi.num<<"t"<<<<"t"<<recordi.sex;for(int j = 0;j < SUBJECT_NUM;j+)(cout<<"t"<<recordi.scorej;)cout<<endl;)/*stuNum-;cout<<" "<<stuNum<<"
20、; "cout<<endl;*/)/if(i != stuNum)(cout<<" "<<endl;show_Table();cout<<recordi.num<<"t"<<<<"t"<<recordi.sex<<"t"cout<<recordi.score0<<"t"<<recordi.score1<<&q
21、uot;t"<<recordi.score2; cout<<endl;for(int j = i+1;j <= stuNum;j+)(recordj-1 = recordj;)cout<<endl;cout<<" : "<<endl;show_Table();for(int i = 1;i <= stuNum-1;i+)(cout<<recordi.num<<"t"<<<<"t"&l
22、t;<recordi.sex;for(int j = 0;j < SUBJECT_NUM;j+)(cout<<"t"<<recordi.scorej;)cout<<endl;)/*stuNum-;cout<<" "<<stuNum<< cout<<endl;*/stuNum-;cout<<" <<stuNum<< " cout<<endl;/*/void Info_modify()cout&l
23、t;<" : "<<endl;cout<<"1."<<endl;cout<<"2. "<<endl;cout<<"3."<<endl;void modifyRecord()int key;cout<<endl;Info_modify();cout<<" : " cin>>key;um = tarNum) cout<<endl<<" &qu
24、ot;<<endl;cout<<" : "cin>>recordi.num;cout<<" :"cin>>;cout<<"cin>>recordi.sex;cout<<" "<<subject0<<""cin>>recordi.score0;cout<<" "<<subject1<<":
25、"cin>>recordi.score1;cout<<" "<<subject2<< "cin>>recordi.score2;void modify_Name(char tarName)int i;for(i = 1;i <= stuNum;i+)if(strcmp(,tarName) = 0)cout<<endl<<" : "<<endl;cout<<":"cin>&g
26、t;recordi.num;cout<<":"cin>>;cout<<":"cin>>recordi.sex;cout<<" "<<subject0<<":"cin>>recordi.score0;cout<<""<<subject1<<"cin>>recordi.score1;cout<<"&qu
27、ot;<<subject2<<":"cin>>recordi.score2;void Info_query()(cout<<": "<<endl;cout<<"1."<<endl;cout<<"2."<<endl;cout<<"3."<<endl;if(key = 3)(while(1)(menu_CMD();void query_Num(int tarNum)(int i;for(i = 1;i <= stuNum;i+)(if(recordi.num = tarNum)(um<<"t"<<rec
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 隧道爆破工程課程設(shè)計
- 選煤工藝課程設(shè)計
- 通信財務(wù)管理課程設(shè)計
- 老年護理培訓(xùn)課程設(shè)計
- 海上日出課程設(shè)計
- 語文德育課程設(shè)計
- 非遺交流系統(tǒng)課程設(shè)計
- 液壓 氣動加緊課程設(shè)計
- 自主游戲小班課程設(shè)計
- 鉆石打磨課程設(shè)計
- 幼兒園大班數(shù)學(xué)練習(xí)題100道及答案解析
- 對講機外殼注射模設(shè)計 模具設(shè)計及制作專業(yè)
- 2024年四川省德陽市中考道德與法治試卷(含答案逐題解析)
- 施工現(xiàn)場水電費協(xié)議
- SH/T 3046-2024 石油化工立式圓筒形鋼制焊接儲罐設(shè)計規(guī)范(正式版)
- 六年級數(shù)學(xué)質(zhì)量分析及改進(jìn)措施
- 一年級下冊數(shù)學(xué)口算題卡打印
- 真人cs基于信號發(fā)射的激光武器設(shè)計
- 【閱讀提升】部編版語文五年級下冊第三單元閱讀要素解析 類文閱讀課外閱讀過關(guān)(含答案)
- 四年級上冊遞等式計算練習(xí)200題及答案
- 法院后勤部門述職報告
評論
0/150
提交評論