




版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、精選學(xué)習(xí)資料 - - - 歡迎下載服裝銷(xiāo)售系統(tǒng)一.【要求】(1) 系統(tǒng)包含三類(lèi)用戶(hù):治理員.店長(zhǎng).銷(xiāo)售員;(2) 向治理員供應(yīng)以下功能:自身密碼修改.其他用戶(hù)添加刪除.用戶(hù)信息修改.統(tǒng)計(jì);商品信息添加.修改.刪除.查找.統(tǒng)計(jì);(3) 向店長(zhǎng)供應(yīng)以下功能:登錄.注銷(xiāo).自身密碼修改.自身信息修改、商品信息修改.商品信息設(shè)計(jì),查看日?qǐng)?bào)表.月報(bào)表.商品銷(xiāo)售量報(bào)表.查找瀏覽器修改商品儲(chǔ)備信息;(4) 向銷(xiāo)售員供應(yīng)以下功能:商品瀏覽.查找.出售,查看自己本日?qǐng)?bào)表.本月報(bào)表;(5) 提示 (1) 總體設(shè)計(jì):整個(gè)服裝銷(xiāo)售系統(tǒng)可設(shè)計(jì)為治理員模塊.店長(zhǎng)模塊.銷(xiāo)售員模塊.商品模塊等;(2) 數(shù)據(jù)結(jié)構(gòu)采納結(jié)構(gòu)體;二.
2、結(jié)構(gòu)圖依據(jù)需求分析,該程序中銷(xiāo)售員應(yīng)實(shí)現(xiàn)如下功能:商品瀏覽.商品查找.出售商品.銷(xiāo)售記錄. 用戶(hù)注銷(xiāo), 詳細(xì)結(jié)構(gòu)圖如下;店長(zhǎng)應(yīng)實(shí)現(xiàn)如下功能:登錄. 注銷(xiāo).自身密碼修改.自身信息修改、商品信息修改.商品信息設(shè)計(jì),查看日?qǐng)?bào)表.月報(bào)表.商品銷(xiāo)售量報(bào)表.查找瀏覽器修改商品儲(chǔ)備信息,詳細(xì)結(jié)構(gòu)圖如下;銷(xiāo)售員商品瀏覽商品查找出售商品銷(xiāo)售記錄用戶(hù)注銷(xiāo)1精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載店長(zhǎng)商商銷(xiāo)商密用品品售品碼戶(hù)瀏查員信修注覽找業(yè)息改銷(xiāo)績(jī)修改治理員需要實(shí)現(xiàn)如下功能:自身密碼修改.其他用戶(hù)添加刪除.用戶(hù)信息修改.統(tǒng)計(jì);商品信息添加.修改.刪除.查找.統(tǒng)計(jì);詳細(xì)結(jié)構(gòu)圖如下;治理員精品學(xué)習(xí)資料精選學(xué)習(xí)資
3、料 - - - 歡迎下載除出銷(xiāo)改品找除加計(jì)用系賬密統(tǒng)商商商用戶(hù)統(tǒng)戶(hù)碼計(jì)品品品戶(hù)添刪退注修加用戶(hù)商查刪添統(tǒng)精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載三.程序中典型的流程圖分析(一)添加模塊(1)分析: 信息添加模塊職工的基本信息包括:用戶(hù).商品基本信息,對(duì)它們輸入后,要存進(jìn)原文件,流程圖如下;2精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載開(kāi)頭文件打開(kāi)否精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載輸入信息輸出錯(cuò)誤信息精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載將信息輸出到磁盤(pán)為否連續(xù)調(diào)用 printf_back 函數(shù)終止(二)瀏覽模塊(1)分析: 瀏覽功能第一需要查找信息為否存在,在查找
4、時(shí),由于磁盤(pán)文件無(wú)序,所以采納直接查找的方法;在容錯(cuò)上有較好的才能,輸錯(cuò)時(shí)系統(tǒng)會(huì)有提示,也會(huì)作出相應(yīng)的反映;算法和以上的分程序有相同的優(yōu)點(diǎn); 流程開(kāi)頭打開(kāi)文件否輸出錯(cuò)誤信息查找商品信息為否查找到輸出商品信息操作存盤(pán)為否連續(xù)終止(三)查詢(xún)模塊3精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載(1)分析:基本信息的查詢(xún)按查詢(xún)方式:按商品的名稱(chēng)查詢(xún),可供挑選的方式比較豐富;但本程序只使用了一種;在查詢(xún)小模塊中采納了直接查找的方法,這主要為由于磁盤(pán)文件無(wú) 序 的 緣 故 ; 程 序 在 選 擇 結(jié) 構(gòu) 上 采 用 了if和else 的 嵌 套 形 式 , 看 起 來(lái) 有 點(diǎn) 繁 雜 ;開(kāi)頭精品學(xué)習(xí)資料精
5、選學(xué)習(xí)資料 - - - 歡迎下載文件打開(kāi)查詢(xún)方式輸出錯(cuò)誤信息精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載商品的名稱(chēng)為否連續(xù)終止(四)刪除模塊(1)分析: 商品信息存放在磁盤(pán)中,程序須將該文件全部取出來(lái),在內(nèi)存中把要?jiǎng)h掉的內(nèi)容除去, 然后在重新輸入到磁盤(pán),這種算法比較合理,但有一點(diǎn)煩瑣; 可以改為另一種方法:設(shè)置一個(gè)標(biāo)示符,對(duì)有這些標(biāo)識(shí)符的記錄在下次輸入時(shí)跳過(guò),在新商品信息輸入時(shí),將其掩蓋就行了;在對(duì)文件進(jìn)行刪除時(shí),考慮到許多方面,如:查詢(xún)不到時(shí)系統(tǒng)該如何處理等;人性化設(shè)計(jì)有在刪除之前詢(xún)問(wèn)為否連續(xù); 流程圖 4精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載開(kāi)頭精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - -
6、- 歡迎下載刪除操作文件打開(kāi)查找商品信息為否查找到輸入信息為否連續(xù)終止輸出錯(cuò)誤信息精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載五)修改模塊(1)分析: 修改與刪除程序相像,治理員信息存放在磁盤(pán)中,程序須將該文件全部取出來(lái),在內(nèi)存中把要修改的內(nèi)容修改,然后在重新輸入到磁盤(pán),這種算法比較合理, 但有一點(diǎn)煩瑣,可以改進(jìn);開(kāi)頭精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載修改操作文件打開(kāi)查找職工信息為否查找到輸入信息為否連續(xù)終止輸出錯(cuò)誤信息精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載四.題目分析1.依據(jù)系統(tǒng)需要三類(lèi)用戶(hù)用它作為主函數(shù):int main5精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載
7、user *use;dress *dress;admin *adm;use=user *malloc200*sizeofuser; userintiateuse;adm=admin *mallocsizeofadmin; adminintiateadm;dress=dress *malloc500*sizeofdress; dressintiatedress;while1iffirstuse、adm、dress=3continue;2.三類(lèi)用戶(hù)的挑選登陸為int *firstuser *use、admin *adm、dress *dressint chose;int temp、temp2; w
8、hile1system"cls"printf"/= 功能菜單 =/n"printf"/n" printf"/n"printf"/1,銷(xiāo)售員登陸/n"printf"/2,店長(zhǎng)登陸/n"printf"/3,治理員登陸/n"printf"/n"printf"/=/n"printf"n/=請(qǐng)選擇服務(wù)的種類(lèi)=/n"scanf"%d"、&chose; ifchose<1|ch
9、ose>5printf"你的挑選顯現(xiàn)錯(cuò)誤!按任意鍵重新的進(jìn)入挑選菜單!n" system"pause"continue;switchchosecase 1:6精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載system"cls" ifuserloaduse=1 usermenuuse、dress;system"pause"精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載case 2:break;system"cls" ifmonloaduse=1精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載m
10、onmenuuse、dress;精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載case 3:break;system"cls" temp=adminloadadm;iftemp=1精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載system"pause" temp2=adminmenuadm、use、dress; return 3;system"pause" continue;default: exit0;/while3.當(dāng)挑選治理員的時(shí)候就用如下程序,注明治理員的初始賬號(hào)為admin int regnewuser *usechar n
11、ame21; char pass7=0; int chose;int i、j; int type;7精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載while1system"cls"printf"用戶(hù)名: "scanf"%s"、&name;printf"密碼: "fori=0;i<6;i+passi=getch;printf"*"精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載輸入 n"printf"nn請(qǐng)輸入用戶(hù)的類(lèi)型:0,銷(xiāo)售員1,店長(zhǎng)" scanf&
12、quot;%d"、&type;while1printf"nn用戶(hù)注冊(cè)信息入完畢,為否確認(rèn).1、確認(rèn)0,重新scanf"%d"、&chose; ifchose.=1&&chose.=0printf"你的輸入有誤,請(qǐng)重新的輸入!n"continue;精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載ifchose=1 fori=0;i<usernum+1;i+ ifusei.flag=0printf"注冊(cè)勝利!請(qǐng)連續(xù)使用!n"strcpyusei.username、name; strc
13、pyusei.pass、pass; usernum+;usei.flag=1; usei.type=type; return 1;else break;int deluseruser *useint i;char name20;printf"請(qǐng)輸入你想要?jiǎng)h除的用戶(hù)的用戶(hù)名:" scanf"%s"、name;fori=0;i<200;i+8精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載ifstrcmpusei.username、name=0printf"nnn用戶(hù)%s 刪除勝利! nnnn"、name; strcpyusei.us
14、ername、"unknown"usei.flag=-1; return 1;printf"用戶(hù)%s 不存在!請(qǐng)查正在次操作!nnnn"、name; return 0;int usealluser *useint i; system"cls"printf"銷(xiāo)售人員: n"fori=0;i<200;i+ifusei.type=0ifusei.flag=1printf"用 戶(hù) 姓 名 :%s用 戶(hù) 密 碼 :%sn"、usei.username、usei.pass;printf"店長(zhǎng)
15、: n" fori=0;i<200;i+ ifusei.type=1ifusei.flag=1printf"用 戶(hù) 姓 名 :%s用 戶(hù) 密 碼 :%sn"、usei.username、usei.pass;int adminloadadmin *admchar name21; char pass7=0; int chose、chose2; int i、j;while1system"cls" printf"治理員賬號(hào):"scanf"%s"、&name;printf"密碼: "
16、;fori=0;i<6;i+passi=getch;9精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載printf"*"while1精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載新輸入 n"printf"nn用戶(hù)登陸信息輸入完畢,為否確認(rèn).1、確認(rèn)0,重scanf"%d"、&chose; ifchose.=1&&chose.=0精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載printf"你的輸入有誤,請(qǐng)重新的輸入!n" continue;ifchose=1ifstrcmpadm->
17、name、name=0 ifstrcmpadm->pass、pass=0精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載n"printf"登陸勝利! 請(qǐng)連續(xù)使用!strcpyusertemp.username、name; return 1;精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載陸! n"printf"輸入的用戶(hù)名或者密碼有誤!1、重新登陸2,退出登scanf"%d"、&chose2; ifchose2=1system"cls" break;精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載elses
18、ystem"cls" return 0;ifchose=0 break;int adminpassadmin *admint i;char pass20=0; char pass220=0; while110精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載system"cls" printf"請(qǐng)輸入新的治理員密碼:"fori=0;i<6;i+passi=getch;printf"*"printf"nnn請(qǐng)?jiān)俅屋斎胄碌闹卫韱T密碼:" fori=0;i<6;i+pass2i=getch;
19、printf"*"ifstrcmppass、pass2.=0printf"nn兩次輸入的新的密碼不一樣,請(qǐng)重新的輸入!nnn" system"pause"精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載nnn"elseprintf"n密碼修改勝利!下一次治理員登陸請(qǐng)使用新的密碼!strcpyadm->pass、pass; system"pause"return 1;精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載int adminoutint chose; while1system"
20、cls"printf"你確定要注銷(xiāo)嗎?1,注銷(xiāo)0,取消 nn" scanf"%d"、&chose;ifchose.=0&&chose.=1 printf"你的選項(xiàng)顯現(xiàn)了錯(cuò)誤,請(qǐng)重新的輸入!nnn" system"pasue"continue;ifchose=1printf"治理員賬戶(hù)注銷(xiāo)完畢! ! nnnn" system"pause"return 1;11精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載else return 0;int ou
21、tint chose; system"cls"printf"真的要退出系統(tǒng)嗎?退出后信息會(huì)全部的丟失!1,退出0,取消 "scanf"%d"、&chose; ifchose=1exit0; else return 1;int adminmenuadmin *adm、user *use、dress *dressint chose1; while1system"cls"printf"n在線(xiàn)用戶(hù):%snn"、usertemp.username;printf"/= = 用戶(hù)功能菜單 =
22、/n"printf"/n"printf"/1 ,添加用戶(hù)/n"printf"/2 ,刪除用戶(hù)/n"printf"/3 ,統(tǒng)計(jì)用戶(hù)/n"printf"/4 ,添加商品/n"printf"/5 ,刪除商品/n"printf"/6 ,查找商品/n"printf"/7 ,商品統(tǒng)計(jì)/n"printf"/8 ,修改密碼/n"printf"/9,注銷(xiāo)賬戶(hù)/n"printf"/0 ,退出系統(tǒng)/
23、n"printf"/=/n"printf"n/=請(qǐng) 選擇服務(wù)的種類(lèi)=/n"scanf"%d"、&chose1; ifchose1<0|chose1>9精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載case 1:printf"你的輸入有誤,請(qǐng)重新的輸入!n" system"pasue"continue; switchchose1精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載12精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載system"cls" r
24、egnewuse; system"pause" break;精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載case 2:case 3:case 4:case 5:case 6:system"cls" deluseruse; system"pause" break;system"cls" usealluse; system"pause" break;system"cls" adddressdress; system"pasue" break;system&q
25、uot;cls" deldressdress; break;system"cls" finddressdress; break;case 7:system"cls" dressalldress; system"pasue" break;精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載13精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載break;case 8:case 9:system"cls" ifadminpassadm=1 continue;system"cls" ifadminou
26、t=1 return 3;精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載case 0:system"cls" ifout=1 continue; break;精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載default: continue;int userloaduser *usechar name21; char pass7=0; int chose、chose2;int i、j; while1system"cls"printf"用戶(hù)名: "scanf"%s"、&am
27、p;name;printf"密碼: "fori=0;i<6;i+passi=getchar; printf"*"while1精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載新輸入 n"printf"nn用戶(hù)登陸信息輸入完畢,為否確認(rèn).1、確認(rèn)0,重scanf"%d"、&chose; ifchose.=1&&chose.=0精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載14精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載printf"你的輸入有誤,請(qǐng)重新的輸入!n" co
28、ntinue;ifchose=1fori=0;i<200;i+ifusei.type=1 ifstrcmpusei.username、name=0ifstrcmpusei.pass、pass=0精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載n"printf"登陸勝利! 請(qǐng)連續(xù)使用!strcpyusertemp.username、name; return 1;精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載退出登陸! n"printf"輸入的用戶(hù)名或者密碼有誤!1、重新登陸2,scanf"%d"、&chose2; ifcho
29、se2=1精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載elsesystem"cls" break;精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載system"cls" return 0;ifchose=0 break;這里面包含了治理員的十個(gè)功能選項(xiàng);4,挑選銷(xiāo)售員和店長(zhǎng), (注明第一次運(yùn)行時(shí)原來(lái)沒(méi)有銷(xiāo)售員和店長(zhǎng),需要治理員添加;)int useroutint chose; while1system"cls"printf"n在線(xiàn)用戶(hù):%snn"、usertemp.username;printf"你確定要
30、注銷(xiāo)嗎?1,注銷(xiāo)0,取消 nn" scanf"%d"、&chose;15精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載ifchose.=0&&chose.=1printf"你的選項(xiàng)顯現(xiàn)了錯(cuò)誤,請(qǐng)重新的輸入!nnn" system"pasue"continue;ifchose=1printf"銷(xiāo)售員賬戶(hù)注銷(xiāo)完畢! ! nnnn" strcpyusertemp.username、"unknown"/system"pause" return 1;e
31、lse return 0;int solduser *use、dress *dresschar name20; int num;int i; int j; int k;system"cls"printf"n在線(xiàn)用戶(hù):%snn"、usertemp.username;printf"請(qǐng)輸入要出售的商品的名稱(chēng):" scanf"%s"、&name;printf"n請(qǐng)輸入出售的數(shù)量:"scanf"%d"、# fork=0;k<200;k+ifstrcmpus
32、ek.username、usertemp.username=0 fori=0;i<500;i+、name=0ifdressi.now<num break; dressi.now=dressi.now-num;printf"nnn商品%s 已經(jīng)銷(xiāo)售出了%d 件 n"、name、num;forj=0;j<100;j+ifusek.mdbj.flag=016精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載、name; usek.mdbj.flag=1; usek.mdbj.total=n
33、um;return 1;printf"商品出售顯現(xiàn)錯(cuò)誤! !請(qǐng)重新操作!nnn" return 0;void mounthuser *useint i;int j;char name20; strcpyname、usertemp.username; system"cls"printf"n在線(xiàn)用戶(hù):%snn"、usertemp.username; fori=0;i<100;i+ifstrcmpusei.username、name=0 forj=0;j<100;j+ifusei.mdbj.flag=1printf"商
34、品名稱(chēng):%s、出售數(shù)量: %dn"、、usei.mdbj.total;int usermenuuser *use、dress *dressint i;int chose1;while1system"cls"printf"n在線(xiàn)用戶(hù):%snn"、usertemp.username;printf"/= = 用戶(hù)功能菜單 =/n"printf"/n"printf"/1 ,商品瀏覽/n"17精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載printf"/2
35、,商品查找/n"printf"/3 ,出售商品/n"printf"/4 ,銷(xiāo)售記錄/n"printf"printf"/5,用戶(hù)注銷(xiāo)/n"/n"printf"/n"printf"/=/n"printf"n/=請(qǐng) 選擇服務(wù)的種類(lèi)=/n"scanf"%d"、&chose1; ifchose1<0|chose1>9printf"你的輸入有誤,請(qǐng)重新的輸入!n" system"pasue
36、"continue;switchchose1case 1:system"cls" dressalldress; break;case 2:system"cls" finddressdress; break;case 3:system"cls" solduse、dress; system"pause" break;case 4:system"cls" mounthuse; system"pause" break;精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載break
37、;case 5:system"cls" ifuserout=1 return 3;精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載18精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載default: continue;int monpassuser *useint i;char pass20=0; char pass220=0; while1printf"請(qǐng)輸入新的密碼:"fori=0;i<6;i+passi=getch;printf"*"printf"nnn請(qǐng)?jiān)俅屋斎胄碌拿艽a:" fori=0;i<6;i
38、+pass2i=getch; printf"*"ifstrcmppass、pass2.=0精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載elseprintf"nn兩次輸入的新的密碼不一樣,請(qǐng)重新的輸入!nnn" system"pause"printf"n密碼修改勝利!下一次登陸請(qǐng)使用新的密碼!nnn" fori=0;i<200;i+精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載ifstrcmpusei.username、usertemp.username=0strcpyusei.pass、pass; syst
39、em"pause"return 1;void monseeuser *useint i;19精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載int j;char name20; system"cls"printf"n在線(xiàn)用戶(hù):%snn"、usertemp.username; fori=0;i<100;i+ifusei.flag=1&&usei.type=0printf" 銷(xiāo)售員姓名:%sn"、usei.username; forj=0;j<100;j+ifusei.mdbj.flag=1p
40、rintf"商品名稱(chēng):%s、出售數(shù)量: %dn"、、usei.mdbj.total;int monloaduser *usechar name21; char pass7=0; int chose、chose2; int i、j;while1system"cls"printf"用戶(hù)名: "scanf"%s"、&name;printf"密碼: "fori=0;i<6;i+passi=getch;printf"*"while1精品學(xué)習(xí)資料
41、精選學(xué)習(xí)資料 - - - 歡迎下載新輸入 n"printf"nn用戶(hù)登陸信息輸入完畢,為否確認(rèn).1、確認(rèn)0,重scanf"%d"、&chose; ifchose.=1&&chose.=0printf"你的輸入有誤,請(qǐng)重新的輸入!n"continue;精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載20精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載ifchose=1fori=0;i<200;i+ifusei.type=1 ifstrcmpusei.username、name=0ifstrcmpusei.pas
42、s、pass=0精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載n"printf"登陸勝利! 請(qǐng)連續(xù)使用!strcpyusertemp.username、name; return 1;精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載退出登陸! n"printf"輸入的用戶(hù)名或者密碼有誤!1、重新登陸2,scanf"%d"、&chose2; ifchose2=1精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載elsesystem"cls" break;system"cls" return 0;精
43、品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載ifchose=0 break;int monoutint chose;while1system"cls"printf"n在線(xiàn)用戶(hù):%snn"、usertemp.username;printf"你確定要注銷(xiāo)嗎?1,注銷(xiāo)0,取消 nn" scanf"%d"、&chose;ifchose.=0&&chose.=121精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載printf"你的選項(xiàng)顯現(xiàn)了錯(cuò)誤,請(qǐng)重新的輸入!nnn" system&
44、quot;pasue"continue;ifchose=1printf"店長(zhǎng)賬戶(hù)注銷(xiāo)完畢! ! nnnn" strcpyusertemp.username、"unknown"return 1;else return 0;int fixdress *dresschar name20、name220; int total;int now;int i; system"cls"printf"n在線(xiàn)用戶(hù):%snn"、usertemp.username;printf"請(qǐng)輸入需要修改信息的商品的名稱(chēng):&quo
45、t; scanf"%s"、&name ;fori=0;i<500;i+、name=0printf"商 品 信 息 : n名 稱(chēng) :%s、 現(xiàn) 存 :%d、 總共:%dn"、、dressi.now、dressi.total;printf"nn請(qǐng)輸入修改以后的商品的名稱(chēng):" scanf"%s"、&name2;printf"nn請(qǐng)輸入修改以后的商品的現(xiàn)存:"scanf"%d"、&now;pri
46、ntf"nn請(qǐng)輸入修改以后的商品的總共:" scanf"%d"、&total;、name2; dressi.now=now; dressi.total=total; printf"nn"printf" 修改以后的商品信息:n名稱(chēng):%s、 現(xiàn)存:%d、 總共:%dn"、、dressi.now、dressi.total;return 1;22精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載printf"修改信息失敗!請(qǐng)查正以后重新的操作! nnn" return 0;int monmenuuser *use、dress *dressint i;int chose1; while1system"cls"printf"n在線(xiàn)用戶(hù):%snn"、usertemp.username;printf"/= = 用戶(hù)功能菜單 =/n"printf"/n"printf"/1 ,商品瀏覽/n"printf"/2 ,商品查找/n"printf"
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 農(nóng)田打井合同范本
- 釕基比率熒光智能傳感平臺(tái)的構(gòu)建及其在生鮮安全檢測(cè)中的應(yīng)用研究
- 文旅融合視域下曲沃“晉都印象”文創(chuàng)設(shè)計(jì)研究
- 新型裝配式鋼-UHPC組合梁高強(qiáng)螺栓連接件抗剪性能研究
- 頁(yè)巖氣油基鉆屑脫油灰渣用作道路混凝土摻合料活性激發(fā)及性能研究
- 男性在醫(yī)療領(lǐng)域的職業(yè)發(fā)展之路
- 基于AHP-ECM的B銀行財(cái)務(wù)風(fēng)險(xiǎn)管理研究
- 多分辨淺剖后處理技術(shù)研究
- 科技與青少年近視問(wèn)題的關(guān)系探討
- 高中生“平面向量及其應(yīng)用”學(xué)習(xí)中運(yùn)算能力現(xiàn)狀調(diào)查研究
- 教師讀書(shū)分享《給教師的建議》課件
- 人民警察紀(jì)律條令試卷含答案
- 婚姻矛盾糾紛調(diào)解培訓(xùn)課件
- 《工程熱力學(xué)》(第四版)配套教學(xué)課件
- (更新版)HCIA安全H12-711筆試考試題庫(kù)導(dǎo)出版-上(單選、多選題)
- 漢語(yǔ)作為第二語(yǔ)言教學(xué)教學(xué)法教案(漢碩)
- 新能源技術(shù)(第二版)完整版課件(全)
- 課程改革與學(xué)前教育發(fā)展研究
- 普通昆蟲(chóng)學(xué)-實(shí)驗(yàn)指導(dǎo)
- 中職對(duì)口升學(xué)養(yǎng)殖專(zhuān)業(yè)獸醫(yī)基礎(chǔ)習(xí)題集判斷題詳解
- 初中物理各單元思維導(dǎo)圖
評(píng)論
0/150
提交評(píng)論