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

正文內(nèi)容

c語(yǔ)言課程設(shè)計(jì)--超市進(jìn)銷存管理信息系統(tǒng)-資料下載頁(yè)

2025-02-10 07:17本頁(yè)面

【導(dǎo)讀】計(jì)的方案等各方面的內(nèi)容。主要是讓使用者了解此系統(tǒng),使他們能更好的運(yùn)用本系統(tǒng),使此系統(tǒng)發(fā)揮出應(yīng)有的作用。本系統(tǒng)運(yùn)用計(jì)算機(jī)管理信息技術(shù),對(duì)超市的進(jìn)銷存過(guò)程進(jìn)。行詳細(xì)的分析,實(shí)現(xiàn)了對(duì)超市的進(jìn)貨、出售和庫(kù)存的科學(xué)管理。詢、價(jià)格查詢、生產(chǎn)地查詢。

  

【正文】 e_node *p。 int id。 int choice,number。double price。char name[20]。char produce [30]。double price1。 int size=sizeof(struct produce_node)。 do{ printf(********************您要錄入信息嗎?請(qǐng)選一,要退出錄入嗎?請(qǐng)輸入零 *************************** \n)。 . f: i++。 scanf(%d,amp。choice)。 if(choice==0amp。amp。i=1) { head=NULL。 } switch (choice){ case 1: head=Create_produce_Doc()。 break。 case 2: labID: printf(請(qǐng)輸入 : 產(chǎn)品序列號(hào) :\n)。 scanf(%d,amp。id)。 if(validateID(id)==1) { printf(\t\t\t\t 此編號(hào)已被使用,請(qǐng)您重新輸入 ......\n)。 goto labID。 } else printf(*******此編號(hào)沒(méi)有被使用您可以使用 *******\n)。 printf(請(qǐng)輸入 : 產(chǎn)品序列號(hào) **商品名稱 **商品產(chǎn)地 **商品數(shù)量 **商品 進(jìn)貨價(jià)格 **商品出售價(jià)格 :\n)。 scanf(%d%s%s%d%lf%lf,amp。id,name,produce,amp。number,amp。price,amp。price1)。 p=(struct produce_node*)malloc(size)。 pnumber=number。 strcpy(pname,name)。 pprice=price。 . pprice1=price1。 pid=id。 strcpy(pproduce,produce)。 head=InsertDoc(head,p)。 break。 case 3: printf(請(qǐng)輸入商品序列號(hào) :\n)。 scanf(%d,amp。id)。 head=DeleteDoc(head,id)。 break。 case 0: break。 } if(choice!=0) { printf(您還要錄入信息嗎?請(qǐng)選二 \n)。 printf(您要?jiǎng)h除剛剛錄入的信息?請(qǐng)選三 \n)。 printf(您要停止錄入 嗎?請(qǐng)選零 \n)。 goto f。 } }while(choice!=0)。 if(head!=NULL) return head。 else { return NULL。 system(cls)。 menu()。 . } } struct produce_node*Create_produce_Doc() { struct produce_node *head,*p。 int number。 int id。 double price。 double price1。 char name[20]。 char produce[30]。 int size=sizeof(struct produce_node)。 head =NULL。 printf(請(qǐng)輸入 : 商品序列號(hào) ***商品名稱 ***商品產(chǎn)地 ***商品數(shù)量 ***商品進(jìn)貨價(jià)格***商品的出售價(jià)格 :\n)。 scanf(%d%s%s%d%lf%lf,amp。id,name,produce,amp。number,amp。price,amp。price1)。 while(number!=0){ p=(struct produce_node*)malloc(size)。 pnumber=number。 strcpy(pname,name)。 strcpy(pproduce,produce)。 pprice=price。 pprice1=price1。 pid=id。 head=InsertDoc(head,p)。 break。 } . return head。 } struct produce_node*InsertDoc(struct produce_node *head,struct produce_node *produce) { struct produce_node*ptr,*ptr1,*ptr2。 ptr2=head。 ptr=produce。 if (head==NULL) { head=ptr。 headnext=NULL。 } else{ while ((ptrid ptr2id)amp。amp。(ptr2next !=NULL)) { ptr1=ptr2。 ptr2=ptr2next。 } if(ptrid=ptr2id) { if(head==ptr2) head=ptr。 else ptr1next=ptr。 ptrnext=ptr2。 } else{ ptr2next=ptr。 ptrnext=NULL。 } } return head。 . } struct produce_node *DeleteDoc(struct produce_node *head,int id) { struct produce_node*ptr1,*ptr2。 while(head!=NULLamp。amp。headid==id){/*如果頭指針即是要?jiǎng)h的數(shù)據(jù)就執(zhí)行 */ ptr2=head。 head=headnext。 free(ptr2)。 } if(head==NULL) { printf(刪除成功 \n)。 return NULL。 } ptr1=head。 ptr2=headnext。 while(ptr2!=NULL){ if(ptr2id==id){ ptr1next=ptr2next。 free(ptr2)。 } else ptr1=ptr2。 ptr2=ptr1next。 } printf(刪除成功 \n)。 return head。 } . void chushou(int count) { struct ima i[1000]。 int shuliang=0。 struct ima temp。 struct ima mm。 int delID。 double jine。 char choice。 int index=0。 int j=0。 FILE *fp。 fp=fopen(,r)。 if(fp==NULL) { printf(\t\t\t 系統(tǒng)錯(cuò)誤,請(qǐng)您重試 ........)。 exit(0)。 } fread(amp。temp,sizeof(struct ima),1,fp)。 while(!feof(fp)) { i[index]=temp。 index++。 fread(amp。temp,sizeof(struct ima),1,fp)。 } fclose(fp)。 . printf(\n\t 請(qǐng)輸入要出售的商品的編號(hào) :)。 scanf(%d,amp。delID)。 fopen(,w)。 if(fp==NULL) { printf(\t\t\t 系統(tǒng)錯(cuò)誤,請(qǐng)您重試 ........)。 exit(0)。 } for( j=0。jindex。j++) { if(i[j].id!=delID) { fwrite(amp。i[j],sizeof(struct ima),1,fp)。 } else { if(i[j].number=count) { mm=i[j]。 i[j].number=i[j].numbercount。 fwrite(amp。i[j],sizeof(struct ima),1,fp)。 } else if(i[j].number!=0) { shuliang=1。 fwrite(amp。i[j],sizeof(struct ima),1,fp)。 } else if(i[j].number==0) . { shuliang=1。 } } } fclose(fp)。 if(shuliang==1) { printf(\t\t\t\t\t 商品庫(kù)存不足不能出售 !!!\n)。 } else { jine=*count。 printf(您所需要的金額為 %lf,jine)。 printf(\t\t\t\t\t 商品已出售 !!!\n)。 } printf(\n 您想繼續(xù)嗎 ?(y/n))。 scanf( %c,amp。choice)。 if(choice==39。Y39。||choice==39。y39。) { int i。 printf(請(qǐng)輸入您要賣(mài)出的數(shù)量: )。 scanf(%d,amp。i)。 chushou(i)。 } else { system(cls)。 . menu()。 } } void liren() { struct ima i。 double index=0。 char choice。 FILE *fp。 fp=fopen(,r)。 if(fp==NULL) { printf(\t\t\t 系統(tǒng)錯(cuò)誤,請(qǐng)你重試 ........)。 exit(0)。 } fread(amp。i,sizeof(struct ima),1,fp)。 while(!feof(fp)) { index=index+**。 fread(amp。i,sizeof(struct ima),1,fp)。 } fclose(fp)。 printf(您的超市庫(kù)存商品預(yù)計(jì)的盈利額 %lf,index)。 printf(\n 您想繼續(xù)嗎 ?(y/n)\n)。 scanf( %c,amp。choice)。 if(choice==39。Y39。||choice==39。y39。) { liren()。 . } else { system(cls)。 menu()。 } }
點(diǎn)擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1