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

正文內(nèi)容

[it計算機]高級語言課程設(shè)計商品進銷存管理程序-資料下載頁

2025-09-06 08:27本頁面

【導(dǎo)讀】錄入商品的進貨與銷售信息;給定商品編號或商品名,查看該商品及庫存信息;按照分析、設(shè)計、編碼、調(diào)試和測試過程完成應(yīng)用程序;學(xué)習(xí)并使用流程圖等工具,并在撰寫報告中使用;程序的各項功能在程序運行時,以菜單方式選擇并執(zhí)行;程序中用鏈表存放學(xué)生證信息并實現(xiàn)增刪減功能。詢、修改記錄,保存文件等操作,此外,還應(yīng)該提供鍵盤式選擇菜單實現(xiàn)功能。后,根據(jù)應(yīng)用程序的提示,從鍵盤輸入相應(yīng)的信息。用戶輸入數(shù)據(jù)時,會給出清晰、明確的提示信息,包括輸入的數(shù)據(jù)內(nèi)容、格式及結(jié)束方式等。開發(fā)系統(tǒng)是windows7家庭普通版,系統(tǒng)類型是32位操作系統(tǒng)。塊;子模塊下面就是子函數(shù)。以上是程序四層函數(shù)調(diào)用關(guān)系示意圖。淺綠色方框的函數(shù)是子函數(shù)。這方面不難解決,只需要調(diào)整。printf的格式轉(zhuǎn)換說明符,使輸出的信息按需要對齊就行了。的雜亂信息及時清除掉。這樣頁面才顯得整潔。要盡量使程序運行頁面看上去很舒適。

  

【正文】 case 7:exit(0)。 } } void add() //添加商品信息,一次添加一條記錄 { int num。 int i。 float bid。 int quantityin。 float price。 int quantityout。 int stocks。 char gno[20]。 int right。 FILE*fp。 40 if((fp=fopen(,r+))==NULL) //以讀寫方式打開 { if((fp=fopen(,w))==NULL) //文件不存在則創(chuàng)建文件 { printf(\n文件不存在且創(chuàng)建失敗 ,返回! \n)。 menu()。 } printf(\n請按照提示輸入商品信息 :\n\n)。 printf(商品名 :)。 scanf(%s,amp。GooInfo[0].Gname)。 do { printf(\n商品號( 3位) :)。 scanf(%s,gno)。 if(strlen(gno)!=3) { printf(輸入錯誤,商品號長度應(yīng)為 3位數(shù) !\n)。 right=1。 getchar()。 } else right=0。 }while(right==1)。 strcpy(GooInfo[0].Gno,gno)。 do { printf(\n進價 :)。 scanf(%f,amp。bid)。 if(bid=0) { 41 printf(進價應(yīng)大于 0,請重新輸入進價 !\n)。 right=1。 getchar()。 } else right=0。 }while(right==1)。 GooInfo[0].Bid=bid。 do { printf(\n進貨量 :)。 scanf(%d,amp。quantityin)。 if(quantityin0) { printf(進貨量應(yīng)不小于 0,請重新輸入進貨量 !\n)。 right=1。 getchar()。 } else right=0。 }while(right==1)。 GooInfo[0].Quantityin=quantityin。 do { printf(\n售價 :)。 scanf(%f,amp。price)。 if(price=0) { printf(售價應(yīng)大于 0,請重新輸入售價 !\n)。 right=1。 getchar()。 42 } else right=0。 }while(right==1)。 GooInfo[0].Price=price。 do { printf(\n銷售量 :)。 scanf(%d,amp。quantityout)。 if(quantityout0) { printf(銷售量應(yīng)不小于 0,請重新輸入銷售量 !\n)。 right=1。 getchar()。 } else right=0。 }while(right==1)。 GooInfo[0].Quantityout=quantityout。 do { printf(\n庫存量 :)。 scanf(%d,amp。stocks)。 if(stocks0) { printf(庫存量應(yīng)不小于 0,請重新輸入 !\n)。 right=1。 getchar()。 } else right=0。 }while(right==1)。 43 GooInfo[0].Stocks=stocks。 fprintf(fp,\n%s\t%s\t%.2f\t%d\t%.2f\t%d\t%d,GooInfo[0].Gname,GooInfo[0].Gno,GooInfo[0].Bid,GooInfo[0].Quantityin,GooInfo[0].Price,GooInfo[0].Quantityout,GooInfo[0].Stocks)。 fclose(fp)。 printf(\n保存成功! \n)。 printf(\n請按 enter鍵返回主菜單 !\n)。 getchar()。 getchar()。 menu()。 } for(i=0。!feof(fp)。i++) //讀取文件 { fscanf(fp,%s%s%f%d%f%d%d,amp。GooInfo[i].Gname,amp。GooInfo[i].Gno,amp。GooInfo[i].Bid,amp。GooInfo[i].Quantityin,amp。GooInfo[i].Price,amp。GooInfo[i].Quantityout,amp。GooInfo[i].Stocks)。 } num=i。 if(num==N) { printf(\n保存記錄數(shù)超出結(jié)構(gòu)體數(shù)組數(shù)的大小,請先修改 N的值 \n)。 menu()。 } printf(\n請按照提示輸入商品信息 :\n\n)。 printf(商品名 :)。 scanf(%s,amp。GooInfo[num].Gname)。 do { 44 printf(\n商品號( 3位) :)。 scanf(%s,gno)。 if(strlen(gno)!=3) { printf(輸入錯誤,商品號長度應(yīng)為 3位數(shù) !\n)。 right=1。 getchar()。 } else right=0。 for(i=0。inum。i++) { if(strcmp(gno,GooInfo[i].Gno)==0) { printf(該商品號 已經(jīng)存在,請重新輸入 !\n)。 right=1。 getchar()。 } } }while(right==1)。 strcpy(GooInfo[num].Gno,gno)。 do { printf(\n進價 :)。 scanf(%f,amp。bid)。 if(bid=0) { printf(進價應(yīng)大于 0,請重新輸入進價 !\n)。 right=1。 getchar()。 45 } else right=0。 }while(right==1)。 GooInfo[num].Bid=bid。 do { printf(\n進貨量 :)。 scanf(%d,amp。quantityin)。 if(quantityin0) { printf(進貨量應(yīng)不小于 0,請重新輸入進貨量 !\n)。 right=1。 getchar()。 } else right=0。 }while(right==1)。 GooInfo[num].Quantityin=quantityin。 do { printf(\n售價 :)。 scanf(%f,amp。price)。 if(price=0) { printf(售價應(yīng)大于 0,請重新輸入售價 !\n)。 right=1。 getchar()。 } else right=0。 }while(right==1)。 46 GooInfo[num].Price=price。 do { printf(\n銷售量 :)。 scanf(%d,amp。quantityout)。 if(quantityout0) { printf(銷售量應(yīng)不小于 0,請重新輸入銷售量 !\n)。 right=1。 getchar()。 } else right=0。 }while(right==1)。 GooInfo[num].Quantityout=quantityout。 do { printf(\n庫存量 :)。 scanf(%d,amp。stocks)。 if(stocks0) { printf(庫存量應(yīng)不小于 0,請重新輸入 !\n)。 right=1。 getchar()。 } else right=0。 }while(right==1)。 GooInfo[num].Stocks=stocks。 47 fprintf(fp,\n%s\t%s\t%.2f\t%d\t%.2f\t%d\t%d,GooInfo[num].Gname,GooInfo[num].Gno,GooInfo[num].Bid,GooInfo[num].Quantityin,GooInfo[num].Price,GooInfo[num].Quantityout,GooInfo[num].Stocks)。 fclose(fp)。 printf(\n保存成功! \n)。 printf(\n請按 enter鍵返回主菜單 !\n)。 getchar()。 getchar()。 menu()。 } void modify() //修改商品信息 { int num。 int i。 int right。 float bid。 int quantityin。 float price。 int quantityout。 int stocks。 char gno[20]。 int found=1。 char GooNO[20]。 FILE*fpr,*fpw。 if((fpr=fopen(,r))==NULL) { printf(文件打不開! \n)。 menu()。 48 } for(i=0。!feof(fpr)。i++) //讀取文件 { fscanf(fpr,%s%s%f%d%f%d%d,amp。GooInfo[i].Gname,amp。GooInfo[i].Gno,amp。GooInfo[i].Bid,amp。GooInfo[i].Quantityin,amp。GooInfo[i].Price,amp。GooInfo[i].Quantityout,amp。GooInfo[i].Stocks)。 } num=i。 fclose(fpr)。 printf(\n請輸入商品號選擇要修改的記錄 :)。 scanf(%s,GooNO)。 for(i=0。inum。i++) { if(strcmp(GooNO,GooInfo[i].Gno)==0) { found=i。 printf(\n你要修改的商品信息為: \n\n)。 printf(商品名 商品號 進價 進貨量 售價 銷售量 庫存量 \n)。 printf(%s\t%s\t%.2f\t%d\t%.2f\t%d\t%d\n,GooInfo[i].Gname,GooInfo[i].Gno,GooInfo[i].Bid,GooInfo[i].Quantityin,GooInfo[i].Price,GooInfo[i].Quantityout,GooInfo[i].Stocks)。 printf(\n請按照提示輸入商品的新信息 :\n)。 printf(商品名 :)。
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1