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

正文內容

c語言課程設計報告(宿舍管理系統(tǒng)(編輯修改稿)

2024-10-11 02:19 本頁面
 

【文章內容簡介】 )。 gets(st[i].age)。 printf(\n 請輸入學生專業(yè): )。 gets(st[i].major)。 fwrite(amp。st[i],sizeof(struct st_message),1,fp)。 printf(輸入成功! \n 是否繼續(xù)錄入 (Y/N)?)。 choice=getchar()。 if(choice==39。y39。||choice==39。Y39。) continue。 else { fclose(fp)。 break。 } } } append_message() /*添加模塊 */ {int i。 char choice。 FILE *fp。 fp=fopen(,at+)。 if(fp==NULL) {printf(\n\n*****庫存文件不存在!請建立。按任意鍵退出! )。 getchar()。 exit(1)。 } for (i=0。i++) {struct st_message st[N]。 system (cls)。 getchar()。 printf(請輸入所添加學生姓名: )。 gets(st[i].name)。 printf(\n 請輸入所添加學生班級: )。 gets(st[i].classs)。 printf(\n 請輸入所添加學生宿舍號: )。 gets(st[i].dorm)。 printf(\n 請輸入所添加學生學號: )。 gets(st[i].num)。 printf(\n 請輸入所添加學生性別: )。 gets(st[i].sex)。 printf(\n 請輸入所添加學生年齡: )。 gets(st[i].age)。 printf(\n 請輸入所添加學生專業(yè): )。 gets(st[i].major)。 fwrite(amp。st[i],sizeof(struct st_message),1,fp)。 printf(輸入成功! \n 是否繼續(xù)添加 (Y/N)?)。 choice=getchar()。 if(choice==39。y39。||choice==39。Y39。) continue。 else {fclose(fp)。 break。 } } } revise_message() /*修改模塊 */ {int i,choice,flag,fno,fsize,fnum。 char re_name[20],s[20]。 FILE *fp。 do {fp=fopen(,rt+)。 fno=fileno(fp)。 fsize=filelength(fno)。 fnum=fsize/sizeof(struct st_message)。 system(cls)。 gets(s)。 printf(請輸入需要修改的學生姓名: )。 gets(re_name)。 for (i=0。ifnum。i++) { fread(amp。st[i],sizeof(struct st_message),1,fp)。 if(!strcmp(re_name,st[i].name)) { printf(\n 該學生信息 \n\n)。 printf(學號 姓名 班級 宿舍號 性別 年齡 專業(yè)\n)。 printf(\n)。 printf(%8s %6s %4s %6s %4s %4s %20s\n,st[i].num,st[i].name, st[i].classs,st[i].dorm,st[i].sex,st[i].age,st[i].major)。 printf(您要修改哪一項? \n)。 printf( \n)。 printf( \n)。 printf( \n)。 printf( \n)。 printf( \n)。 printf( \n)。 printf( \n)。 printf( \n)。 scanf(%d,amp。choice)。 switch(choice) {case 1:printf(\n 請輸入修改后的學號: )。 scanf(%s,st[i].num)。break。 case 2:printf(\n 請輸入修改后的姓名: )。 scanf(%s,st[i].name)。break。 case 3:printf(\n 請輸入修改后的班級: )。 scanf(%s,st[i].classs)。break。 case 4:printf(\n 請輸入修改后的宿舍號: )。 scanf(%s,st[i].dorm)。break。 case 5:printf(\n 請輸入修改后的性別: )。 scanf(%s,st[i].sex)。break。 case 6:printf(\n 請輸入修改后的年齡: )。 scanf(%s,st[i].age)。break。 case 7:printf(\n 請輸入修改后的專業(yè): )。 scanf(%s,st[i].major)。break。 case 8:return 1。 } getchar()。 system(cls)。 printf(\n 修改后的學生信息 \n\n)。 printf(學號 姓名 班級 宿舍號 性別 年齡 專業(yè)\n)。 printf(\n)。 printf(%8s %6s %4s %6s %4s %4s %20s\n,st[i].num,st[i].name, st[i].classs,st[i].dorm,st[i].sex,st[i].age,st[i].major)。 rewind(fp)。 fseek(fp,sizeof(struct st_message)*i,0)。 fwrite(amp。st[i],sizeof(struct st_message),1,fp)。 fclose(fp)。 break。 } } if(i==fnum) printf(\n 該學生信息不存在! )。 printf(\n\n 繼續(xù)修改嗎 ?(Y/N))。 choice=getchar()。 if(choice==39。Y39。||choice==39。y39。) {flag=1。 system(pause)。 } else flag=0。 }while(flag==1)。 return 1。 } delete_message() /*刪除模塊 */ {int i,j,choice,fno,fsize,fnum。 char d_num[10]。 FILE *fp。 system(cls)。 getchar()。 fp=fopen(,rt)。 if(fp==NULL) {printf(\n\n*****庫存文件不存在!請先建立。按任意鍵退出! )。 getchar()。 exit(1)。 } fno=fileno(fp)。 fsize=filelength(fno)。 fnum=fsize/sizeof(struct st_message)。 for(i=0。ifnum。i++) fread(amp。st[i],sizeof(struct st_message),1,fp)。 printf(請輸入需要刪除學生的學號: \n)。 gets(d_num)。 system(cls)。 for(i=0。ifnum。i++) {if(!strcmp(d_num,st[i].num)) {printf(\n 該學生信息 \n\n)。 printf(學號 姓名 班級 宿舍號 性別 年齡 專 業(yè) \n)。 printf(\n)。 printf(%8s %6
點擊復制文檔內容
公司管理相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1