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

正文內(nèi)容

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

2025-01-12 04:31本頁面
  

【正文】 nt size=sizeof(struct produce_node)。 do{ printf(********************您要錄入信息嗎?請選一,要退出錄入嗎?請輸入零 *************************** \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(請輸入 : 產(chǎn)品序列號 :\n)。 scanf(%d,amp。id)。 if(validateID(id)==1) { printf(\t\t\t\t 此編號已被使用,請您重新輸入 ......\n)。 goto labID。 } else printf(*******此編號沒有被使用您可以使用 *******\n)。 printf(請輸入 : 產(chǎn)品序列號 **商品名稱 **商品產(chǎn)地 **商品數(shù)量 **商品進貨價格 **商品出售價格 :\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(請輸入商品序列號 :\n)。 scanf(%d,amp。id)。 head=DeleteDoc(head,id)。 break。 case 0: break。 } if(choice!=0) { printf(您還要錄入信息嗎?請選二 \n)。 printf(您要刪除剛剛錄入的信息?請選三 \n)。 printf(您要停止錄入嗎?請選零 \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(請輸入 : 商品序列號 ***商品名稱 ***商品產(chǎn)地 ***商品數(shù)量 ***商品進貨價格***商品的出售價格 :\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){/*如果頭指針即是要刪的數(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)錯誤,請您重試 ........)。 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 請輸入要出售的商品的編號 :)。 scanf(%d,amp。delID)。 fopen(,w)。 if(fp==NULL) { printf(\t\t\t 系統(tǒ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 商品庫存不足不能出售 !!!\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(請輸入您要賣出的數(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)錯誤,請你重試 ........)。 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(您的超市庫存商品預(yù)計的盈利額 %lf,index)。 printf(\n 您想繼續(xù)嗎 ?(y/n)\n)。 scanf( %c,amp。choice)。 if(choice==39。Y39。||choice==39。y39。) { liren()。 . } else { system(cls)。 menu()。 } }
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1