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

正文內(nèi)容

[實習總結(jié)]計算機實習報告c語言部分_c語言大作業(yè)(編輯修改稿)

2025-04-19 00:52 本頁面
 

【文章內(nèi)容簡介】 束符*/ fscanf(fp,%d %s %s %s %d,amp。tshuhao,tname,tauthor,tchuban,amp。txcl)。 n。 fclose(fp)。 /*關(guān)閉文件*/ return (n)。 /*返回個數(shù)*/}int tjdzzs() /*統(tǒng)計讀者文本個數(shù)函數(shù)*/{ FILE *fp。 int zhenghao=0,n。 char mingzi[20]={39。\039。},riqi[20]={39。\039。},zname[20]={39。\039。}。 fp=fopen(,r)。 /*打開文件*/ for (n=0。!feof(fp)。n++) /*逐個讀文件*/ fscanf(fp,%d %s %s %s ,amp。zhenghao,amp。mingzi,amp。riqi,amp。zname)。 fclose(fp)。 /*關(guān)閉文件*/ return (n)。 /*返回個數(shù)*/}void pastword1(){ void tsjinku()。 /*圖書進庫*/ int m,n,flag1,flag2。 char name[20]=ustb,password[6]=123456。 char person[20],password1[6]。 for(m=0。m!=3。) { printf(請輸入管理員用戶名:\n)。 scanf(%s,person)。 flag1=strcmp(person,name)。 printf(請輸入六位管理員密碼:\n)。 for(n=0。n6。n++) { password1[n]=getch()。 if(password1[n]=39。039。||password1[n]=39。939。||password1[n]=39。a39。||password1[n]=39。z39。||password1[n]=39。A39。||password1[n]=39。Z39。) putchar(39。*39。)。 /*用循環(huán)體達到隱藏密碼的目的*/ } flag2=strcmp(password,password1)。 if(flag1==0amp。amp。flag2==0) { tsjinku()。 break。 } else { printf(\n\n\n您輸入的用戶名或密碼錯誤!對不起,您無權(quán)對圖書館信息進行更改!\n\n任意鍵返回\n)。 m++。 getch()。 tsgxx()。 } }} void pastword2(){ void shanchu()。 /*清除庫存函數(shù)*/ int m,n,flag1,flag2。 char name[20]=ustb,passwordx[6]=123456。 char person[20],password2[6]。 for(m=0。m!=3。) { printf(請輸入管理員用戶名:\n)。 scanf(%s,person)。 flag1=strcmp(person,name)。 printf(請輸入六位管理員密碼:\n)。 for(n=0。n6。n++) { password2[n]=getch()。 if(password2[n]=39。039。||password2[n]=39。939。||password2[n]=39。a39。||password2[n]=39。z39。||password2[n]=39。A39。||password2[n]=39。Z39。) putchar(39。*39。)。 /*用循環(huán)體達到隱藏密碼的目的*/ } flag2=strcmp(passwordx,password2)。 if(flag1==0amp。amp。flag2==0) { shanchu()。 break。 } else { printf(\n\n\n您輸入的用戶名或密碼錯誤!對不起,您無權(quán)對圖書館信息進行更改!\n\n任意鍵返回\n)。 m++。 getch()。 tsgxx()。 } }} void tsjinku() /*圖書進庫函數(shù)*/{ FILE *fp。 int shuhao=0,xcl=0,n=0。 char name[20]={39。\039。},author[20]={39。\039。},chuban[20]={39。\039。}。 char hitkey。 system (cls)。 if ((fp=fopen(,r))==NULL) /*打開圖書館文件,不存在此文件則新建*/ { fp=fopen(,w)。 fclose(fp)。 } fp=fopen(,a)。 printf(\n\n\n\n\n\n\t\t\t請按以下格式輸入圖書信息:\t\t\t\t\t\t 書號 書名 作者 出版社 進庫量\n請輸入:)。 /*按格式輸入圖書館信息*/ for (。hitkey!=27。) /*循環(huán)輸入*/ { if (n!=0) printf(請輸入:)。 scanf(%d%s%s%s%d,amp。shuhao,name,author,chuban,amp。xcl)。 fprintf(fp,%d %s %s %s %d\n,shuhao,name,author,chuban,xcl)。 printf(繼續(xù)輸入請按回車,結(jié)束輸入請按esc\n)。 n++。 hitkey=getch()。 for (。hitkey!=13amp。amp。hitkey!=27。) hitkey=getch()。 } fclose(fp)。 printf(\n\n\n\n\n\n\t\t\t保存成功,按任意鍵返回上一層!)。 getch()。 tsgxx()。 /*返回上一層*/}void shanchu() /*刪除圖書信息函數(shù)*/{ struct library *head=NULL。 struct library *p,*p1,*p2。 int tshuhao=0,txcl=0,n=0,j,i。 char tname[20]={39。\039。},tauthor[20]={39。\039。},tchuban[20]={39。\039。}, ttname[20]={39。\039。}。 char hitkey。 FILE *fp。 if ((fp=fopen(,r))==NULL) /*打開文件*/ { system (cls)。 printf(\n\n\n\n\n\n\n\n\n\t\t\t記錄文件不存在!按任意鍵返回...)。 getch()。 tsgxx()。 } else { system (cls)。 printf(\n\n\n\n\n\n\n\n\t\t請輸入你要刪除的書名:)。 scanf(%s,amp。ttname)。 printf(\t\t確認刪除請回車,取消請按esc\n)。 /*輸入刪除圖書書名*/ hitkey=getch()。 for (。hitkey!=13amp。amp。hitkey!=27。) hitkey=getch()。 if (hitkey==27) tsgxx()。 fp=fopen(,r)。 for (j=0。!feof(fp)。) /*讀文件夾信息,統(tǒng)計個數(shù)*/ { j++。 fscanf(fp,%d%s%s%s%d,amp。tshuhao,tname,tauthor,tchuban,amp。txcl)。 } fclose(fp)。 fp=fopen(,r)。 for (i=1。ij。i++) { fscanf(fp,%d%s%s%s%d,amp。tshuhao,tname,tauthor,tchuban,amp。txcl)。 if (strcmp(ttname,tname)) /*比較名字,將不同名字的信息復制到鏈表*/ { n++。 if (n==1) { p1=p2=(struct library*)malloc(LEN)。 /*建立鏈表*/ head=p1。 } else { p2next=p1。 p2=p1。 p1=(struct library*)malloc(LEN)。 /*新建鏈表*/ } p1shuhao=tshuhao。 /*復制書號*/ strcpy(p1name,tname)。 /*復制書名*/ strcpy(p1author,tauthor)。 /*復制作者名子*/ strcpy(p1chuban,tchuban)。 /*復制出版社*/ p1xcl=txcl。 /*復制個數(shù)*/ } } if (n==0) { head=NULL。 } else { p2next=p1。 p1next=NULL。 fclose(fp)。 } } fp=fopen(,w)。 /*清空文件*/ fclose(fp)。 fp=fopen(,a)。 /*追加文件*/ p=head。 for (。p!=NULL。) /*把鏈表內(nèi)容覆蓋到文件*/ { fprintf(fp,%d %s %s %s %d \n,pshuhao,pname,pauthor,pchuban,pxcl)。 p=pnext。 } fclose(fp)。 /*關(guān)閉文件*/ system (cls)。 printf(\n\n\n\n\n\n\n\n\t\t 刪除成功 \n\t\t按任意鍵返回上一層\n)。 getch()。 /*返回上一層*/ tsgxx()。}void chaxunts() /*查詢函數(shù)*/{ FILE *fp。 char choose。 int ttshuhao=0,tshuhao=0,txcl=0,n=0,k=0,i,l。 char tname[20]={39。\039。},ttauthor[20]={39。\039。},tauthor[20]={39。\039。},ttchuban[20]={39。\039。},tchuban[20]={39。\039。}, ttname[20]={39。\039。}。 if ((fp=fopen(,r))==NULL) /*打開文件*/ { system (cls)。 printf(\n\n\n\n\n\n\n\n\n\t\t\t記錄文件不存在!按任意鍵返回...)。 getch()。 tsgxx()。 } l=tjzs()。 /*獲得文件個數(shù)*/ menu2()。 /*調(diào)用菜單函數(shù)*/ scanf(%c,amp。choose)。scanf(%c,amp。choose)。 /*選擇查詢方式*/ if (choose==39。539。) return。 else if (choose==39。139。) /*書號查詢*/ { system (cls)。 printf(請輸入書號:)。 scanf(%d,amp。ttshu
點擊復制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1