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

正文內(nèi)容

c語(yǔ)言程序設(shè)計(jì)word版(編輯修改稿)

2025-02-12 07:15 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 amp。st[i].age)。getchar()。 printf(請(qǐng)輸入 qq 號(hào) : )。 scanf(%d,amp。st[i].wage)。 getchar()。 printf(請(qǐng)輸入住址 : )。 scanf(%s,st[i].addr)。 getchar()。 printf(請(qǐng)輸入電話(huà) : )。 scanf(%d,amp。st[i].tel)。 printf(\n)。 } printf(\n 創(chuàng)建完畢!\n)。 save(m)。 }void save(int m) /*保存文件函數(shù)*/ { int i。 FILE*fp。 if ((fp=fopen(student_list,wb))==NULL) /*創(chuàng)建文件并判斷是否能打開(kāi) */ { printf (cannot open file\n)。 exit(0)。 } for (i=0。im。i++) /*將內(nèi)存中學(xué)生的信息輸出到磁盤(pán)文件中去*/ if (fwrite(amp。st[i],sizeof(struct student),1,fp)!=1) printf(file write error\n)。 fclose(fp)。 } int load() /*導(dǎo)入函數(shù)*/ { FILE*fp。 int i=0。 if((fp=fopen(student_list,rb))==NULL) { printf (cannot open file\n)。 exit(0)。 } else { do { fread(amp。st[i],sizeof(struct student),1,fp)。 i++。 } while(feof(fp)==0)。 }6fclose(fp)。 return(i1)。 }void display() /*瀏覽函數(shù)*/ { int i。 int m=load()。 printf(\n 學(xué)號(hào)\t 姓名\t 性別\t 出生年月日\(chéng)t 年齡\t \t 住址\t 電話(huà)\n)。 for(i=0。im。i++) /*m 為輸入部分的學(xué)生人數(shù) */printf(\n%d\t%s\t%c\t%s\t%d\t%d\t%s\t%ld\n,st[i].num,st[i].name,st[i].sex,st[i].boime,st[i].age,st[i].qq,st[i].addr,st[i].tel)。 } void del() /*刪除函數(shù)*/ { int m=load()。 int i,j,n,t,flag。 char name[20]。 printf(\n 原來(lái)的學(xué)生信息:\n)。 display()。 /* 調(diào)用瀏覽函數(shù) */ printf(\n)。 printf(請(qǐng)輸入要?jiǎng)h除的學(xué)生的姓名:\n)。 scanf(%s,name)。 for(flag=1,i=0。flagamp。amp。im。i++) { if(strcmp(st[i].name,name)==0) { printf(\n 已找到該生,原始記錄為:\n)。 printf(\n 學(xué)號(hào)\t 姓名\t 性別\t 出生年月日\(chéng)t 年齡\t \t 住址\t 電話(huà)\n)。 printf(\n%d\t%s\t%c\t%s\t%d\t%d\t%s\t%ld\n,st[i].num,st[i].name,st[i].sex,st[i].boime,st[i].age,st[i].qq,st[i].addr,st[i].tel)。 printf(\n 確實(shí)要?jiǎng)h除此人信息請(qǐng)按,不刪除請(qǐng)按\n)。 scanf(%d,amp。n)。 if(n==1) /*如果刪除,則其他的信息都往上移一行 */ { for(j=i。jm1。j++) { strcpy(st[j].name,st[j+1].name)。 st[j].num=st[j+1].num。 st[j].sex=st[j+1].sex。st[j].boime=st[j+1].boime。 st[j].age=st[j+1].age。 strcpy(st[j].nianji,st[j+1].nianji)。 st[j].qq=st[j+1].qq。 strcpy(st[j].addr,st[j+1].addr)。 st[j].tel=st[j+1].tel。 } flag=0。 } } }7 if(!flag) m=m1。 else printf(\n 對(duì)不起,查無(wú)此人!\n)。 printf(\n 瀏覽刪除后的所有學(xué)生信息:\n)。 save(m)。 /*調(diào)用保存函數(shù)*/display()。 /*調(diào)用瀏覽函數(shù) */ printf(\n 繼續(xù)刪除請(qǐng)按 1,不再刪除請(qǐng)按 2\n)。 scanf(%d,amp。t)。 switch(t) { case 1:del()。break。 case 2:break。 default :break。 } }void add()/*添加函數(shù)*/ { FILE*fp。 int n。 int count=0。 int i。 int m=load()。 printf(\n 原來(lái)的學(xué)生信息:\n)。 display()。 /* 調(diào)用瀏覽函數(shù) */ printf(\n)。 fp=fopen(classmae_list,a)。 printf(請(qǐng)輸入想增加的學(xué)生數(shù):\n)。 scanf(%d,amp。n)。 for (i=m。i(m+n)。i++) { printf(\n 請(qǐng)輸入新增加學(xué)生的信息:\n)。 printf(請(qǐng)輸入學(xué)號(hào): )。printf(%8d ,st[i].num)。 printf(\n)。 printf(請(qǐng)輸入姓名: )。 scanf(%s,st[i].name)。 getchar()。 printf(請(qǐng)輸入性別(f女 m男): )。 scanf(%c,amp。st[i].sex)。printf(“請(qǐng)輸入出生年月日:”)。scanf(“%s”,amp。st[i].boime)。 printf(請(qǐng)輸入年齡: )。 scanf(%d,amp。st[i].age)。printf(請(qǐng)輸入 : )。 scanf(%d,amp。st[i].qq)。8 printf(請(qǐng)輸入住址: )。 scanf(%s,st[i].addr)。 printf(請(qǐng)輸入電話(huà): )。 scanf(%d,amp。st[i].tel)。 printf(\n)。 count=count+1。 printf(已增加的人數(shù):\n)。 printf(%d\n,co
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1