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

正文內(nèi)容

c語言圖書銷售系統(tǒng)(源代碼)-資料下載頁

2025-07-25 09:18本頁面
  

【正文】 車鍵繼續(xù):)。 rewind(stdin)。/*清空緩沖區(qū)*/}void delet_by_bname(){ char bname[41],ch1。 struct book *head2=NULL。 struct book *p4,*p5,*p6。 int n=0。 printf(\n\t\t\t請輸入要刪除的圖書書名:)。 rewind(stdin)。/*清空緩沖區(qū)*/ gets(bname)。 head2=p4=p6=p5=(struct book*)malloc(LEN)。 p4next=NULL。 p1=head。 while(p1!=NULL) { /*將滿足刪除要求的圖書放到一起存儲起來*/ if(strcmp(bname,p1bname)==0amp。amp。p1acount==0) { n++。 *p4=*p1。 p5=(struct book*)malloc(LEN)。 p4next=p5。 p6=p4。 p4=p5。 p4next=NULL。 } p1=p1next。 } p6next=NULL。 free(p5)。 if(n==0) { system(cls)。 printf(\n\n\t\t\t對不起!沒有找到您要刪除的圖書信息\n\n)。 printf(\n\n\t\t\t是否要顯示已經(jīng)售完的圖書(Y\\N):)。 rewind(stdin)。/*清空緩沖區(qū)*/ ch1=getchar()。 if(ch1==39。y39。||ch1==39。Y39。) { system(cls)。 bover()。/*調(diào)用函數(shù),顯示全部已經(jīng)售完的書*/ shan_flag=1。/*調(diào)用標志,此處調(diào)用后,將不會重復顯示刪除方式菜單,直至刪除一項信息*/ } } else { /*開始刪除,支持多本刪除*/ for(p4=head2。p4!=NULL。p5=p4,p4=p4next) { p1=head。 while(p1!=NULL) { if(strcmp(p1bname,p4bname)==0amp。amp。p1acount==0) break。 else {p2=p1。p1=p1next。} } if(headnext==NULL) { free(head)。 head=NULL。 } else if(p1==head) { head=p1next。 free(p1)。 } else { p2next=p1next。 free(p1)。 } } system(cls)。 printf(\n\n\t\t\t圖書信息刪除完畢.......\n\n)。 printf(\n\n\t\t\t按回車鍵繼續(xù):)。 rewind(stdin)。/*清空緩沖區(qū)*/ save_flag=1。 shan_flag=0。 }}void delet_by_author(){ char author[21],ch1。 struct book *head2=NULL。 struct book *p4,*p5,*p6。 int n=0。 printf(\n\t\t\t請輸入要刪除的圖書作者:)。 rewind(stdin)。/*清空緩沖區(qū)*/ gets(author)。 head2=p4=p5=p6=(struct book*)malloc(LEN)。 p4next=NULL。 p1=head。 while(p1!=NULL) { /*將滿足刪除要求的圖書放到一起存儲起來*/ if(strcmp(author,p1author)==0amp。amp。p1acount==0) { n++。 *p4=*p1。 p5=(struct book*)malloc(LEN)。 p4next=p5。 p6=p4。 p4=p5。 p4next=NULL。 } p1=p1next。 } p6next=NULL。 free(p5)。 if(n==0) { system(cls)。 printf(\n\n\t\t\t對不起!沒有找到您要刪除的圖書信息\n\n)。 printf(\n\n\t\t\t是否要顯示已經(jīng)售完的圖書(Y\\N):)。 rewind(stdin)。/*清空緩沖區(qū)*/ ch1=getchar()。 if(ch1==39。y39。||ch1==39。Y39。) { system(cls)。 bover()。/*調(diào)用函數(shù),顯示全部已經(jīng)售完的書*/ shan_flag=1。/*調(diào)用標志,此處調(diào)用后,將不會重復顯示刪除方式菜單,直至刪除一項信息*/ } } else { /*開始刪除,支持多本刪除*/ for(p4=head2。p4!=NULL。p5=p4,p4=p4next) { p1=head。 while(p1!=NULL) { if(strcmp(p1author,p4author)==0amp。amp。p1acount==0) break。 else {p2=p1。p1=p1next。} } if(headnext==NULL) { free(head)。 head=NULL。 } else if(p1==head) { head=p1next。 free(p1)。 } else { p2next=p1next。 free(p1)。 } } system(cls)。 printf(\n\n\t\t\t圖書信息刪除完畢.......\n\n)。 printf(\n\n\t\t\t按回車鍵繼續(xù):)。 rewind(stdin)。/*清空緩沖區(qū)*/ save_flag=1。 shan_flag=0。 }}/*列表顯示*/void list(){ p1=head。 if(p1==NULL||T==0)/*文件不存在或書庫中沒書*/ { printf(\n\n\n\n\t\t\t\t當前書庫沒書!!!)。 printf(\n\n\t\t 按回車鍵返回:)。 rewind(stdin)。/*清空緩沖區(qū)*/ getchar()。 return。 } else { printf(\n\n\t\t *************當前書庫信息*************\n)。 printf(\n\n書號 書名 作者 售價 數(shù)量\n\n)。 if(p1price!=0) { printf(%15s%25s%15s % %5d\n,p1bnum,p1bname,p1author,p1price,p1acount)。 p1=p1next。 } else { p1next=NULL。 } printf(\n)。 } printf(圖書信息列出完畢,按回車鍵返回子菜單:)。 rewind(stdin)。/*清空緩沖區(qū)*/ getchar()。 system(cls)。 }/*保存信息*/void save(){ FILE *fp。 if(head==NULL||T==0)/*文件不存在或書庫中沒書*/ { printf(\n\n\n\n\n\n\n\n\n\n\t\t\t\t書庫沒有收藏書\n\n\t\t\t\t按回車鍵返回:)。 rewind(stdin)。/*清空緩沖區(qū)*/ getchar()。 system(cls)。 return。 } if(save_flag==0) { printf(\n\n\n\n\n\n\n\n\n\n\t\t\t\t圖書信息已保存過\n\n\t\t\t\t按回車鍵返回:)。 rewind(stdin)。/*清空緩沖區(qū)*/ getchar()。 system(cls)。 return。 } if((fp=fopen(,w))==NULL) { printf(\n\n\n\n\n\n\n\n\n\n\t\t\t\t圖書信息保存失敗\n\n\t\t\t\t按回車鍵返回:)。 rewind(stdin)。/*清空緩沖區(qū)*/ getchar()。 system(cls)。 return。 } p1=head。 while(p1!=NULL) /*開始保存*/ { fprintf(fp,%s %s %s %.2f %d\n\n,p1bnum,p1bname,p1author,p1price,p1acount)。 p1=p1next。 } fclose(fp)。 printf(\n\n\n\n\n\n\n\n\n\n\t\t\t\t信息保存完畢\n\n\t\t\t\t按回車鍵返回繼續(xù)........\n\n)。 rewind(stdin)。 /*清空緩沖區(qū)*/ getchar()。 save_flag=0。 return。}/*退出*/void exit0(){ int j=0。 char ch。 if(save_flag==1) { printf(\n\n\n\n\n\n\n\n\n\n\t\t\t\t書庫信息變動過\n\n\t\t\t\t需要保存信息???\n\n)。 printf(\n\n\t\t\t\t按任意鍵保存 N不保存\n\n)。 rewind(stdin)。/*清空緩沖區(qū)*/ ch=getchar()。 if(ch!=39。n39。amp。amp。ch!=39。N39。) { system(cls)。 save()。/*調(diào)用保存*/ } } p1=head。 while(p1!=NULL) { p2=p1next。free(p1)。p1=p2。/*釋放結(jié)點*/ } system(cls)。 exit (0)。}void inputbook() /*新建書庫信息*/{ int i,n,t=0,mistake_flag=0。 struct book *p7,*p8。 p8=(struct book*)malloc(LEN)。 if(head!=NULL) { p3=head。 while(p3next!=NULL)/*使P3指向最后一本書信息*/ p3=p3next。 printf(\n\n\n\n\n\n\n\n\n\n\t\t 書庫中已有書籍,新建書庫信息將保存在原信息后面\n)。 rewind(stdin)。/*清空緩沖區(qū)*/ printf(\n\n\t\t\t\t 按回車鍵繼續(xù):)。 getchar()。 system(cls)。 p3next=p1=(struct book*)malloc(LEN)。/*開辟一個新單元*/ } else head=p1=(struct book*)malloc(LEN)。 p1next=NULL。 printf(\n\n\n\n\n\n\n\n\n\n\t\t 請輸入需創(chuàng)建的書籍信息條數(shù)n(1~50):)。 rewind(stdin)。/*清空緩沖區(qū)*/ scanf(%d,amp。n)。 while(n1||n50) { system(cls)。 printf(\n\n\n\n\n\n\n\n\n)。 printf(\n\n\t\t\t輸入有誤,請輸入一個正整數(shù)(1~50)\n)。 printf(\n\t\t\t\t請重新輸入:)。 rewind(stdin)。/*清空緩沖區(qū)*/ scanf(%d,amp。n)。 } system(cls)。 printf(\n\n 書號:10個數(shù)字或字符組成 書名:小于20個漢字或40個字符 作者:小于10個漢字或20個字符\n)。 printf(\n\n 請每行按 書號 書名 作者 書價 數(shù)量 的形式輸入%d條書籍信息\n,n)。 for(i=1。i=n。i++) { p7=head。 printf(\n\n請輸入第%d本書信息:,i)。 scanf(%s%s%s%f%d,p8bnum,p8bname,p8author,amp。p8price,amp。
點擊復制文檔內(nèi)容
范文總結(jié)相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1