资源描述:
《c语言超市管理》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、C语言超市管理#inelude〃stdio.h〃#inelude〃bios・h〃#inelude"conio.h〃ttinclude"STRING.H〃ttinclude"DOS.h"ttinclude"process・h〃#inelude"stdlib.h〃ttinclude"math・h〃#definekeydown80#definekey_up72#definekeyesc1#definekeyaltf33#definekey_alt_x45#definekeyenter28#definekeyaltc46#defineke
2、y_alt_e18#definekeyalts31#definekeyaltd32#definekey_alt_r19#definekeyaltp25#definekeyalto24structstudent{charname[20];longnum;charage[2]:charsex[4];charxibie[16];charjigua.n[50];struct{floatChinese;floatenglish;floatmath;floattotal;floatave;}score;structstudent*next;}
3、;structstudentagent[50];structstudent*hea.d,*thisl,*newl,*new2,*stud;charnumstr[40]='};intn二0;intr=0;intk二0;longnum;intget_key();voidbox(intstartx,intstarty,inthigh,intwidth);voidnewlname(void),listall(void),wfi1e(void),rfile(void);structstudent^insert(structstudent*h
4、ead,structstudent*stud);voidcjlr(),cjtj(),cjpx(),cxxs(),list(),cxcj();voiddel();intmmm();intnnn();voidab();mmm(){charaaa.[6],bbb[6];chard;//intr=0;inti二0;FILE*fp;chara[6];charb[6];clrscr();if((fp=fopen(〃filel〃,)二二NULL){window(l,1,80,25);textbackground(1);textcolor(0);
5、clrscr();window(20,8,60,20);textbackground(14);textcolor(0);clrscr();gotoxy(8,2);cprintf("NOUER!〃);fclose(fp);fp二fopen(〃filel〃,〃w〃);gotoxy(2,4);printf(z,Pleaseinputname:,z);gets(a);fwrite(a,6,1,fp);gotoxy(2,8);printf(z,Pleaseinputkey:,z);gets(b);fwrite(b,6,1,fp);fclos
6、e(fp);ab();}else{window(1,1,80,25);textbackground(1);textcolor(0);clrscr();window(20,&60,20);textbackground(14);textcolor(0);clrscr();gotoxy(8,2);Password:z,);cprintf(''InputYourNameAndgotoxy(2,8);cprintf(“PWD:〃);gotoxy(2,4);cprintf("NAME:〃);scanf(〃%s〃,aaa);gotoxy(7,8
7、);while(d=getch()){if(d二二13)break;cprintf(“*“);bbb[i]二d;i++;}fp二fopen(〃filel〃,;fread(a,6,1,fp);fread(b,6,1,fp);fclose(fp);for(i=0;i<=5;i++){if(aaa[i]!=a[i]
8、bbb[i]!=b[i])exit(0);ab();nnn(){unionREGSinregs,outregs;inregs・h.ah=0x2a;intdos(&inregs,&outregs);window(60,24,8
9、0,25);textbackground(14);textcolor(0);clrscr();cprintf("Datais2004-%d~%d.〃,outregs・h.dh,outregs・h.dl);return0;}voidab(){in