資源簡(jiǎn)介
用C編寫(xiě)的超市收銀系統(tǒng) ~比較完整的實(shí)現(xiàn)了超市收銀系統(tǒng)的基本功能

代碼片段和文件信息
#include?“super.h“
extern?void?savegoodsinf();
extern?void?savememberinf();
/*********************************************************************************/
void?CheckBill()//業(yè)績(jī)查詢
{
int?a=1;
int?i;
float?monthsale=0monthprofile=0;
float?monthcost=0;
time_t?ltime;
struct??SellLNode?*?p1;
time(<ime);
while(a)
{
printf(“\n\t\t***************************************************\n“);
printf(“\t\t*?????????歡?迎?進(jìn)?入?超?市?管?理?員?系?統(tǒng)????????*\n“);
printf(“\t\t***************************************************\n“);
printf(“\t\t ?1.查看本日出售記錄\n“);
printf(“\t\t ?2.查看日銷售業(yè)績(jī)\n“);
printf(“\t\t ?3.查看日入庫(kù)數(shù)額\n“);
printf(“\t\t ?0.退出\n“);
printf(“\t\t***************************************************\n“);
printf(“\t\t??????????%s“ctime(?<ime?));
printf(“\t\t***************************************************\n“);
printf(“\t\t請(qǐng)選擇:“);
fflush(stdin);
scanf(“%d“&a);
switch(a)
{
case?0:?
system(“cls“);
break;
case?1:
p1=sellhead.next;
printf(“編號(hào)????名稱????????數(shù)目????價(jià)格(元)??????時(shí)間\n“);
while(p1!=NULL)
{
printf(“%-8d%-12s%-8d%-14.2f%d:%d\n“p1->data.codep1->data.c\
???????p1->data.nump1->data.pricep1->data.soldtime.hourp1->data.soldtime.minute);
p1=p1->next;
}
printf(“\t按任意鍵返回!“);
fflush(stdin);
getchar();
system(“cls“);
break;
case?2:?
printf(“日期(日)??日銷售額(元)??日收益(元)\n“);
for?(i=0;i<31;i++)
{
printf(“%-10d%-14.2f%.2f\n“i+1sale1[i].daysalesale1[i].profit);
monthsale+=sale1[i].daysale;
monthprofile+=sale1[i].profit;
}
printf(“本月總營(yíng)銷額為:%.2f元\n“monthsale);
printf(“本月總盈利為:%.2f元\n“monthsale);
printf(“\t按任意鍵返回!“);
fflush(stdin);
getchar();
system(“cls“);
break;
case?3:
printf(“日期(日)??日入庫(kù)成本(元)\n“);
for?(i=0;i<31;i++)
{
printf(“%-10d%-14.2f\n“i+1stock1[i].day_cost);
monthcost+=stock1[i].day_cost;
}
printf(“本月入庫(kù)總成本為:%.2f元\n“monthcost);
printf(“\t按任意鍵返回!“);
fflush(stdin);
getchar();
system(“cls“);
break;
default:printf(“請(qǐng)輸入正確的選項(xiàng)!“);
}
}
}
/*********************************************************************************/
int?revise_price()??????//修改商品出售價(jià)格;
{
int?id=0;
struct??GoodsLNode?*p;
p=goodshead.next;
printf(“要修改價(jià)錢(qián)的商品代號(hào):“);
fflush(stdin);
scanf(“%d“&id);
while?(p!=NULL&&p->data.code==id)
{
if?(p->data.code==id)
{
printf(“編號(hào)??名稱????????產(chǎn)地????????庫(kù)存數(shù)目??進(jìn)價(jià)????售價(jià)????生產(chǎn)日期????失效期\n“);
printf(“%-6d%-12s%-12s%-10d%-8.2f%-8.2f%-4d.%-2d.%-4d%-4d.%-2d.%-2d\n“\
p->data.codep->data.cp->data.Np->data.nump->data.truepricep->data.soldprice\
p->data.perday.yearp->data.perday.monthp->data.perday.day\
p->data.failday.yearp->data.failday.monthp->data.failday.day);
printf(“價(jià)格要修改為:“);
fflush(stdin);
scanf(“%f“&p->data.soldprice);
printf(“修改成功!“);
return?1;
}
p=p->next;
}
if?(NULL==p)
{
printf(“商品編號(hào)不存在,請(qǐng)?jiān)谌可唐沸畔⒅写_認(rèn)!\n“);
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????8402??2010-12-14?16:16??超市收銀系統(tǒng)最終版\Check.c
?????文件???????5837??2010-12-14?11:56??超市收銀系統(tǒng)最終版\DataDeal.c
?????文件???????2280??2010-12-13?23:05??超市收銀系統(tǒng)最終版\Login.c
?????文件?????????84??2010-12-10?10:50??超市收銀系統(tǒng)最終版\main.c
?????文件??????11367??2010-12-14?16:16??超市收銀系統(tǒng)最終版\Sell1.c
?????文件??????11112??2010-12-14?16:14??超市收銀系統(tǒng)最終版\Stock.c
?????文件?????????28??2010-12-10?10:54??超市收銀系統(tǒng)最終版\super.c
?????文件???????2539??2010-12-14?14:11??超市收銀系統(tǒng)最終版\super.h
?????文件???????4619??2010-12-10?18:01??超市收銀系統(tǒng)最終版\test.dsp
?????文件????????533??2010-11-29?22:19??超市收銀系統(tǒng)最終版\test.dsw
?????文件?????115712??2010-12-14?16:24??超市收銀系統(tǒng)最終版\test.ncb
?????文件??????56832??2010-12-14?16:24??超市收銀系統(tǒng)最終版\test.opt
?????文件???????1228??2010-12-14?16:24??超市收銀系統(tǒng)最終版\test.plg
?????文件??????24623??2010-12-14?16:16??超市收銀系統(tǒng)最終版\Debug\Check.obj
?????文件??????????0??2010-12-14?16:17??超市收銀系統(tǒng)最終版\Debug\Check.sbr
?????文件??????14836??2010-12-14?14:11??超市收銀系統(tǒng)最終版\Debug\DataDeal.obj
?????文件??????????0??2010-12-14?14:11??超市收銀系統(tǒng)最終版\Debug\DataDeal.sbr
?????文件???????9483??2010-12-14?16:07??超市收銀系統(tǒng)最終版\Debug\Login.obj
?????文件??????????0??2010-12-14?16:07??超市收銀系統(tǒng)最終版\Debug\Login.sbr
?????文件???????2309??2010-12-14?16:23??超市收銀系統(tǒng)最終版\Debug\main.obj
?????文件??????????0??2010-12-14?16:23??超市收銀系統(tǒng)最終版\Debug\main.sbr
?????文件??????31670??2010-12-14?16:17??超市收銀系統(tǒng)最終版\Debug\Sell1.obj
?????文件??????????0??2010-12-14?16:17??超市收銀系統(tǒng)最終版\Debug\Sell1.sbr
?????文件??????31351??2010-12-14?16:24??超市收銀系統(tǒng)最終版\Debug\Stock.obj
?????文件??????????0??2010-12-14?16:24??超市收銀系統(tǒng)最終版\Debug\Stock.sbr
?????文件?????164864??2010-12-14?16:24??超市收銀系統(tǒng)最終版\Debug\test.bsc
?????文件?????229465??2010-12-14?16:24??超市收銀系統(tǒng)最終版\Debug\test.exe
?????文件?????393780??2010-12-14?16:24??超市收銀系統(tǒng)最終版\Debug\test.ilk
?????文件?????219824??2010-12-14?16:07??超市收銀系統(tǒng)最終版\Debug\test.pch
?????文件?????648192??2010-12-14?16:24??超市收銀系統(tǒng)最終版\Debug\test.pdb
............此處省略7個(gè)文件信息
評(píng)論
共有 條評(píng)論