版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
#include<stdio.h>#include<windows.h>#include<conio.h>intadd();intamend();intremove();intshow_student();intshow_class();structinfo //用于存儲學(xué)生信息{charname[20]; //姓charsex[20]; //性別charidcard[20]; //身份證號charstuid[10]; //學(xué)號characademe[20]; //學(xué)charspecialty[20]; //專業(yè)charclassid[20]; //班級charhome[20]; //生源地}stu[100];intj=0;intmain(void) //主函數(shù){/**/chargongnengxuanzhe;intflag=1;system("cls");printf("\n");printf("\t\t\t\t printf("\n\n\t尊敬的用戶,非常感謝您使用本系統(tǒng),您的完美體驗(yàn)將是我們前進(jìn)的方向!\n\n\n");printf("\t系統(tǒng)功能簡介:\n\n\n");printf("\t\t①\n\n");printf("\t\t②\n\n");\n\n");printf("\t\t④\n\n");printf("\t\t⑤\n\n");printf("\t\t⑥\n\n\n");printf("\t按任意鍵進(jìn)入系統(tǒng) ");getch();do{system("cls");printf("\n\n\n");printf(" !\n");printf("\n\n\n");printf(" 1.\n\n");printf(" printf(" 3.\n\n");printf(" 4.\n\n");printf(" 5.\n\n");printf(" 0.\n\n\n\n");printf(" gongnengxuanzhe=getch();switch(gongnengxuanzhe){case'1':add();break;case'2':amend();break;case'3':remove();break;case'4':show_student();break;case'5':show_class();break;case'0':flag=0;break;default:{printf("\n\n 您的輸入有誤請仔細(xì)閱讀使用說printf("\n 任意鍵繼...");getch();}}system("cls");printf("\n\n\n\n\n\n\n\n\n\n\tprintf("\n\n\t\t\t 按任意鍵退出系統(tǒng) ");getch();return0;}intadd() //增加學(xué)生信息函數(shù){charflag='1';do{system("cls");printf("\n\t姓名:");scanf("%s",&stu[j].name);printf("\n\n\t性別:");scanf("%s",&stu[j].sex);printf("\n\n\tscanf("%s",&stu[j].idcard);printf("\n\n\t:");printf("\n\n\t專業(yè):");scanf("%s",&stu[j].specialty);printf("\n\n\t班級:");scanf("%s",&stu[j].classid);printf("\n\n\t學(xué)號:");scanf("%s",&stu[j].stuid);printf("\n\n\t生源地:");scanf("%s",&stu[j].home);j++;printf("\n\t1,:");getchar();flag=getchar();}while(flag=='1');return0;}intamend() //修改學(xué)生信息函數(shù){if(j==0){");}
system("cls");printf("\n\n\n\n\n\n\n\n\n\n\t\t 系統(tǒng)無任何可以修改的記錄,請先行輸入數(shù)據(jù)!printf("\n\n\t\t\t 按任意鍵返回 ");getch();return0;chara[20];intz;intflag=0;do{system("cls");printf("\n\tscanf("%s",a);for(z=0;z<j;z++){if(strcmp(stu[z].stuid,a)==0){flag=1;break; //break不會執(zhí)行}}if(flag==0){printf("\t對不起,你請求學(xué)生信息不存在,請核實(shí)后重!\n");printf("\t按任意鍵繼續(xù) ");getch();}}while(flag==0);system("cls");printf("\n\t姓名:");scanf("%s",&stu[z].name);printf("\n\n\t性別:");scanf("%s",&stu[z].sex);printf("\n\n\tscanf("%s",&stu[z].idcard);printf("\n\n\t:");printf("\n\n\t專業(yè):");scanf("%s",&stu[z].specialty);printf("\n\n\t班級:");scanf("%s",&stu[z].classid);printf("\n\n\t學(xué)號:");scanf("%s",&stu[z].stuid);printf("\n\n\tscanf("%s",&stu[z].home);return0;}intremove() //刪除學(xué)生信息函數(shù){if(j==0){");}
system("cls");printf("\n\n\n\n\n\n\n\n\n\n\t\t 系統(tǒng)無任何可以刪除的記錄,請先行輸入數(shù)據(jù)!printf("\n\n\t\t\t 按任意鍵返回 ");getch();return0;charintz;intx;intflag=0;do{system("cls");printf("\n\tscanf("%s",a);for(z=0;z<j;z++){if(strcmp(stu[z].stuid,a)==0){flag=1;for(x=z;x<j;x++){}j--;
strcpy(stu[x].name,stu[x+1].name);strcpy(stu[x].sex,stu[x+1].sex);strcpy(stu[x].idcard,stu[x+1].idcard);strcpy(stu[x].academe,stu[x+1].academe);strcpy(stu[x].specialty,stu[x+1].specialty);strcpy(stu[x].classid,stu[x+1].classid);strcpy(stu[x].stuid,stu[x+1].stuid);strcpy(stu[x].stuid,stu[x+1].stuid);printf("\n\t刪除成功!");printf("\n\t按任意鍵返回上級菜單 ");getch();}}if(flag==0){printf("\t對不起,你請求學(xué)生信息不存在,請核實(shí)后重!\n");printf("\t按任意鍵繼續(xù) ");getch();}}while(flag==0);return0;}intshow_student() //單個顯示學(xué)生信息函數(shù){if(j==0){");
system("cls");printf("\n\n\n\n\n\n\n\n\n\n\t\t 系統(tǒng)無任何可以顯示的記錄,請先行輸入數(shù)據(jù)!printf("\n\n\t\t\t 按任意鍵返回 ");getch();return0;}chara[20];intz;intflag=0;do{system("cls");printf("\n\tscanf("%s",a);for(z=0;z<j;z++){if(strcmp(stu[z].stuid,a)==0){flag=1;system("cls");printf("\n\t姓名:%s",stu[z].name);printf("\n\n\t性別:%s",stu[z].sex);printf("\n\n\t身份證號:%s",stu[z].idcard);printf("\n\n\t學(xué):%s",stu[z].academe);printf("\n\n\t專業(yè):%s",stu[z].specialty);printf("\n\n\t班級:%s",stu[z].classid);printf("\n\n\t學(xué)號:%s",stu[z].stuid);printf("\n\n\t生源地:%s",stu[z].home);printf("\n\n\t按任意鍵返回上級菜單 getch();}}if(flag==0){printf("\t對不起,你請求顯示的學(xué)生信息不存在,請核實(shí)后重!\n");printf("\t按任意鍵繼續(xù) ");getch();}}while(flag==0);return0;}intshow_class() //顯示整個班級學(xué)生信息函數(shù){if(j==0){");
system("cls");printf("\n\n\n\n\n\n\n\n\n\n\t\t 系統(tǒng)無任何可以顯示的記錄,請先行輸入數(shù)據(jù)!printf("\n\n\t\t\t 按任意鍵返回 ");getch();return0;}charintz;intx;intflag=0;do{system("cls");printf("\n\tscanf("%s",a);for(z=0;z<j;z++){if(strcmp(stu[z].classid,a)==0){flag=1;system("cls");printf("\t%s %s\n",stu[z].specialty,stu[z].classid);for(x=0;x<j;x++){if(strcmp(stu[x].classid,a)==0){printf("\n\n\t姓名:%s",stu[z].name);printf("\n\t性別:%s",stu[z].sex);printf("\n\t身份證號:%s",stu[z].idcard);printf("\n\t:%s",stu[z].academe);printf("\n\t專業(yè):%s",stu[z].specialty);printf("\n\t班
溫馨提示
- 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)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 財(cái)務(wù)部門績效考核方案
- 2025-2030照明設(shè)備行業(yè)分析技術(shù)革新市場競爭格局
- 2025-2030熱電材料聲子熱導(dǎo)調(diào)控溫度傳感系統(tǒng)設(shè)計(jì)
- 2025-2030潛水器材應(yīng)用范圍分析及深海資源開發(fā)投資策略研究
- 2025-2030湘菜預(yù)制菜市場機(jī)遇與挑戰(zhàn)研究
- 2025-2030消防設(shè)施行業(yè)市場競爭供需分析及物聯(lián)網(wǎng)監(jiān)測技術(shù)應(yīng)用規(guī)劃報(bào)告
- 2025-2030消防安全管理體系現(xiàn)狀分析及企業(yè)安全生產(chǎn)預(yù)防規(guī)劃研究文獻(xiàn)
- 2025-2030消費(fèi)級基因檢測產(chǎn)品差異化競爭與營銷策略報(bào)告
- 2025-2030消費(fèi)級AR眼鏡光學(xué)顯示模組技術(shù)迭代與用戶體驗(yàn)優(yōu)化方向
- 2025-2030消費(fèi)級AR眼鏡光學(xué)方案成本對比與內(nèi)容生態(tài)培育路徑分析報(bào)告
- 中建三局2024年項(xiàng)目經(jīng)理思維導(dǎo)圖
- 中國藥物性肝損傷診治指南(2024年版)解讀
- 基層黨建知識測試題及答案
- DG-TJ08-2021-2025 干混砌筑砂漿抗壓強(qiáng)度現(xiàn)場檢測技術(shù)標(biāo)準(zhǔn)
- 鼻竇炎的護(hù)理講課課件
- 腸系膜脂膜炎CT診斷
- 體外膜肺氧合技術(shù)ECMO培訓(xùn)課件
- 老年醫(yī)院重點(diǎn)??平ㄔO(shè)方案
- 銀行解封協(xié)議書模板
- 超星爾雅學(xué)習(xí)通《學(xué)術(shù)規(guī)范與學(xué)術(shù)倫理(華東師范大學(xué))》2025章節(jié)測試附答案
- GB 17440-2025糧食加工、儲運(yùn)系統(tǒng)粉塵防爆安全規(guī)范
評論
0/150
提交評論