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

正文內(nèi)容

c語言課設(shè)之學(xué)生證管理系統(tǒng)(編輯修改稿)

2025-05-04 05:23 本頁面
 

【文章內(nèi)容簡介】 ase input your delete school number[ ]\b\b\b\b\b\b\b)。 scanf(%ld,amp。a)。 for(i=0。ik。i++) if(st[i].num==a) {printf(The deleted information are:%ld%s%d%ld%ld,st[i].num,st[i].name,st[i].sex,st[i].classes,st[i].birth)。for(。ik1。i++) {st[i].num=st[i+1].num。 strcpy(st[i].name,st[i+1].name)。 st[i].sex=st[i+1].sex。 st[i].classes=st[i+1].classes。 st[i].birth=st[i+1].birth。 } j=k1。 fp=fopen(student1,wb)。 if(!fp) {printf(Document error! )。 exit(0)。} rewind(fp)。 fprintf(fp,%d,j)。 for(i=0。ij。i++) fprintf(fp,%ld%s%d%ld%ld,st[i].num,st[i].name,st[i].sex,st[i].classes,st[i].birth)。 free(st)。fclose(fp)。menu()。 break。 } else {printf(There is no this schol number!)。 free(st)。fclose(fp)。menu()。 } }統(tǒng)計模塊[分析]統(tǒng)計的主要項目有姓名、班級、性別和出生日期,并通過可輸入菜單完成統(tǒng)計項目的選擇和相應(yīng)功能的執(zhí)行。在統(tǒng)計時是將輸入的信息和結(jié)構(gòu)體中的已有信息進行比較,如果出現(xiàn)同樣的信息便輸出該同學(xué)的信息并進行記數(shù)統(tǒng)計。完成后釋放結(jié)構(gòu)體指針空間,返回到menu()函數(shù)繼續(xù)選擇并執(zhí)行其他操作。[流程圖]顯示一系列功能選項輸入n,判斷n是否是15輸出統(tǒng)計姓 名輸出統(tǒng)計班 級輸出統(tǒng)計性 別輸出統(tǒng)計生 日關(guān)閉文件釋放指針返回統(tǒng)計函數(shù)繼續(xù)統(tǒng)計n=1n=2n=3n=4n=5N返回主函數(shù)[程序]/********************************statistic*************************/ void statistic(int k,STU *st) {int n,w,i,b,p=0。 long a。 int name[10]。 do {printf(\n\t\t***************STATISTIC MENU***************\n\n)。 printf(\t\t\ statistic\n)。 printf(\t\t\ statistic\n)。 printf(\t\t\ statistic\n)。 printf(\t\t\ of birth statistic\n)。 printf(\t\t\)。 printf(\n\n\t\t********************************************\n)。 printf(Choice your number(15)[ ]\b\b\b\b\b\b\b)。 scanf(%d,amp。n)。 if(n1amp。amp。n5) {w=1。getchar()。} else w=0。 }while(w==1)。 switch(n) {case 1:printf(\nPlease input you statistic name[ ]\b\b\b\b\b\b\b\b\b)。 scanf(%s,name)。 for(i=0。ik。i++) {if(!strcmp(st[i].name,name)) {p++。 printf(%ld%s%d%ld%ld,st[i].num,st[i].name,st[i].sex,st[i].classes,st[i].birth)。 } } if(p) printf(There are %d students.,p)。 statistic(k,st)。 case 2:printf(\nPlease input you classes[ ]\b\b\b\b\b\b\b)。 scanf(%ld,amp。a)。 for(i=0。ik。i++) {if(st[i].classes==a) {p++。 printf(%ld%s%d%ld%ld,st[i].num,st[i].name,st[i].sex,st[i].classes,st[i].birth)。 } } if(p) printf(There are %d students.,p)。 statistic(k,st)。 case 3:printf(\nPlease input you statistic sex M or F[ ]\b\b\b\b\b\b\b)。 scanf(%d,amp。b)。 for(i=0。ik。i++) {if(st[i].sex==b) {p++。 printf(%ld%s%d%ld%ld,st[i].num,st[i].name,st[i].sex,st[i].classes,st[i].birth)。 } } if(p) printf(There are %d students.,p)。 statistic(k,st)。 case 4:printf(\nPlease input you date of birth[ ]\b\b\b\b\b\b\b)。 scanf(%ld,amp。a)。 for(i=0。ik。i++) {if(st[i].classes==a) {p++。 printf(%ld%s%d%ld%ld,st[i].num,st[i].name,st[i].sex,st[i].classes,st[i].birth)。 } } if(p) printf(There are %d students.,p)。 statistic(k,st)。 case 5:free(st)。menu()。 } }五、 上機操作六、 源程序includeincludeincludeincludedefine STU struct student STU {long num。 char name[20]。 int sex。 long classes。 long birth。 }。/***************************input****************************/void input(int k,STU *st) {int n,i。 FILE *fp。 long b。 STU student_1。 printf(Please input your number[ ]\b\b\b\b\b\b\b)。 scanf(%ld,amp。b)。 for(i=0。ik。i++) if(st[i].num==b) {printf(\nThe school number is repeat!\n)。 free(st)。menu()。} else {printf(\nPlease input your name[ ]\b\b\b\b\b\b\b\b\b)。 scanf(%s,)。 printf(\nPlease input you sex male(1) or female(2)[ ]\b\b\b\b\b\b\b)。 scanf(%d,amp。)。 printf(\nPlease input you Class[ ]\b\b\b\b\b\b\b)。 scanf(%ld,amp。)。 printf(\nPlease input you date of birth[ ]\b\b\b\b\b\b\b
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1