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

正文內(nèi)容

c語言圖書管理系統(tǒng)實驗報告(編輯修改稿)

2024-09-07 12:21 本頁面
 

【文章內(nèi)容簡介】 pnext=head_。 head_=p。 } } } fclose(fp)。 return 0。}函數(shù)的原型:int chuangjian()函數(shù)的功能:記錄圖書的各項信息程序:int chuangjian() //創(chuàng)建圖書信息 { struct fi_info *p=NULL。 p=(struct fi_info*)malloc(sizeof(struct fi_info))。 printf(請輸入書名:)。 scanf(%s,pname)。 printf(請輸入作者名:)。 scanf(%s,pwriter)。 printf(請輸入書號:)。 scanf(%s,pshuhao)。 printf(請輸入分類:)。 scanf(%s,amp。pfenlei)。 printf(請輸入出版社:)。 scanf(%s,pchuban)。 printf(請輸入出版時間:)。 scanf(%d,amp。pchubantime)。 printf(請輸入價格:)。 scanf(%f,amp。pprice)。 ptype=news。 Book_num+=1。 pnext=head。 head=p。 return 0。}函數(shù)的原型:void chazhao()函數(shù)的功能:通過書名查找、作者查找、組合查找三種方式查找圖書信息。程序:void chazhao() //查找圖書信息 { struct fi_info *p=NULL。 char name[10],writer[21]。 int price。 int b=1,i。 printf(按書名查找請按1.\n按作者名查找請按2.\n按組合查詢請按3.\n)。 scanf(%d,amp。i)。 if(i==1) { printf(請輸入要查找的書名:)。 scanf(%s,name)。 for(p=head。p!=NULL。p=pnext) //一個鏈表指針p的遍歷,直到結(jié)尾p==NULL { if(strcmp(name,pname)==0) //字符串的比較函數(shù),若前后相等則等于0 { b=0。 //若存在,則b=0 printf(找到要查找的圖書信息:\n)。 printf(圖書名稱 %s\n,pname)。 printf(圖書作者 %s\n,pwriter)。 printf(圖書書號 %s\n,pshuhao)。 printf(圖書分類 %s\n,pfenlei)。 printf(出版社 %s\n,pchuban)。 printf(出版時間 %d\n,pchubantime)。 printf(圖書價格 %.2f\n,pprice)。 } } if(head==NULL) printf(查無此書\n)。 if(b) printf(查找的圖書信息不存在!\n)。 //若b=1,則不存在 }else if(i==2){ printf(請輸入要查找的作者名:)。 scanf(%s,writer)。 for(p=head。p!=NULL。p=pnext) //一個鏈表指針p的遍歷,直到結(jié)尾p==NULL { if(strcmp(writer,pwriter)==0) //字符串的比較函數(shù),若前后相等則等于0 { b=0。 //若存在,則b=0 printf(找到要查找的圖書信息:\n)。 printf(圖書名稱 %s\n,pname)。 printf(圖書作者 %s\n,pwriter)。 printf(圖書書號 %s\n,pshuhao)。 printf(圖書分類 %s\n,pfenlei)。 printf(出版社 %s\n,pchuban)。 printf(出版時間 %d\n,pchubantime)。 printf(圖書價格 %.2f\n,pprice)。 } } if(head==NULL) printf(查無此書\n)。 if(b) printf(查找的圖書信息不存在!\n)。 //若b=1,則不存在 } else if(i==3
點擊復(fù)制文檔內(nèi)容
外語相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1