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

正文內(nèi)容

c課程設(shè)計(jì)報(bào)告-超市管理系統(tǒng)-資料下載頁

2025-01-18 20:51本頁面
  

【正文】 ()。 system(cls)。 } if(m==2) { head=readfile()。 head=sort2(head)。 savefile(head)。 ch=getch()。 system(cls)。 }}struct goods *sort1(struct goods *head) { struct goods *p, *h, *q, *temp, t。 //價(jià)格排序 h=headnext。 printf(\n\n\n\n\n\t\t\t商品按價(jià)格從高到低排序?yàn)?\n\n)。 for(p = h。 p 。 p = pnext) for(q = pnext。 q。 q = qnext) if((pprice) (qprice)0) { t = *p。 *p = *q。 *q = t。 temp = pnext。 pnext = qnext。 qnext = temp。 } print(head)。 printf(\n\t\t\t按任意鍵返回菜單。)。 return head。} struct goods *sort2(struct goods *head) { struct goods *p, *h, *q, *temp, t。 //貨號排序 h=headnext。 printf(\n\n\n\n\n\t\t\t商品按貨號排序?yàn)?\n\n)。 for(p = h。 p。 p = pnext) for(q = pnext。 q。 q = qnext) if((pnumber) (qnumber)0) { t = *p。 *p = *q。 *q = t。 temp = pnext。 pnext = qnext。 qnext = temp。 } print(head)。 printf(\n\t\t\t按任意鍵返回菜單。)。 return head。} find(struct goods *head) // 查詢{ struct goods *p。 int a,b。 printf(請選擇:\n)。 printf(\t\\n\t\)。 printf(\n\n\t\t請輸入序號: )。 scanf(%d,amp。b)。 if(b==1) { printf(\n輸入你要查詢的商品貨號: )。 scanf(%d,amp。a)。 printf(\n)。 p=headnext。 while(p!=NULL) { if(pnumber==a) { printf( \t\t貨號 名稱 類型 單價(jià)(元) 數(shù)量 )。 printf(\n \t%d %s %s %d %d\n,pnumber,pname,ptype,pprice,pamount)。 break。 } p=pnext。 } if(p==NULL) printf(\n沒有找到相關(guān)商品\n\n)。 } if(b==2) { p=headnext。 printf(\n輸入你要查找的商品價(jià)格: )。 scanf(%d,amp。a)。 while(p!=NULL) { if(pprice==a) { printf( \t\t貨號 名稱 類型 單價(jià)(元) 數(shù)量 )。 printf(\n \t%d %s %s %d %d\n,pnumber,pname,ptype,pprice,pamount)。 break。 } p=pnext。 } if(p==NULL) printf(\n沒有找到相關(guān)商品\n\n)。 } printf(按任意鍵返回菜單。)。 return(0)。}void savefile(struct goods *p){ FILE *fp。 struct goods *p1。 fp=fopen(,wt)。 p1=pnext。 while(p1!=NULL) { fprintf(fp,%d %s %s %d %d\n,p1number,p1name,p1type,p1price,p1amount)。 p1=p1next。 } fclose(fp)。 }print(struct goods *head){ struct goods *p1。 p1=headnext。 printf(\t\t\t貨號 名稱 類型 價(jià)格 數(shù)量 \n)。 while(p1!=NULL) { printf(\t\t\t %d %s %s %d %d\n,p1number,p1name,p1type,p1price,p1amount)。 p1=p1next。 } return 0。}struct goods *readfile(){ struct goods *head,*p,*p2。 FILE *fp。 if((fp= fopen(,rt))== NULL) { printf(不能打開目標(biāo)文件\n)。 exit(0)。 } head=(struct goods *)malloc(L)。 p2=head。 while(!feof(fp)) { p=(struct goods *)malloc(L)。 fscanf(fp,%d %s %s %d %d\n,amp。pnumber,pname,ptype,amp。pprice,amp。pamount)。 p2next=p。 //把讀出的每一條信息放入一個(gè)節(jié)點(diǎn)中 p2=p。 } p2next=NULL。 fclose(fp)。 return head。 }void finish () //結(jié)束界面//{ char a。 int b=1。 printf( \n\n\n\n)。 printf(\t ~~~~~~~~~~~~~~~~%% %%~~~~~~~~~~~~~~~~~~\n)。 printf(\t ~~~~~~~~~~~~~~%% %%~~~~~~~~~~~~~~~~\n)。 printf(\t ~~~~~~~~~~~~%% %%~~~~~~~~~~~~~~\n)。 printf(\t ~~~~~~~~~~%% %%~~~~~~~~~~~~\n)。 printf(\t ~~~~~~~~%% 謝謝使用! %%~~~~~~~~~~\n)。 printf(\t ~~~~~~~~~~%% %%~~~~~~~~~~~~\n)。 printf(\t ~~~~~~~~~~~~%% %%~~~~~~~~~~~~~~\n)。 printf(\t ~~~~~~~~~~~~~~%% %%~~~~~~~~~~~~~~~~\n)。 printf(\t ~~~~~~~~~~~~~~~~%% %%~~~~~~~~~~~~~~~~~~\n)。 printf( \n\n\t 您想要繼續(xù)進(jìn)行管理系統(tǒng)操作嗎?)。 printf( \n\n\t Y: 是。返回主菜單。 )。 printf( \n\n\t N: 否。退出系統(tǒng)。\n\n)。 printf(\t\t\t)。 flushall()。 a=getchar()。 do{ if(a==39。Y39。) { system(cls)。 Menu()。 } else if(a==39。N39。) { exit(0)。 } else { printf(\t\t\t輸入錯(cuò)誤代號!請重新輸入: )。 b=0。 flushall()。 a=getchar()。 } }while(b==0)。
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1