酒店管理--酒店管理系统C语言版.doc:..酒店管理系统.・•c语言版。//<!-以下是此酒店的所需的头文件-->#include<>#include<>#include<string・h>#include〈time・h>//成员变量的声明inti,j,k,p二0;chartemp[]二“";introom[5][5];clocktstart;//成员'方法的声明voidinit(){intx,y,z;for(x二0;x〈5;x++){for(y=0;y<5;y++){room[x][y]二0;}}}voidhotelTitle(){printfC\n 酒店房间登记与计费管理系统--一\n〃);printf(z,\\n〃);printf(z,\\rT);printfC\\rT);printf(z,\\n〃);printf(z/\\rT);}voidhotel_execute();voidhotel_select();voidhotelouthotel();voidoutsystem();voidhotel_total();intmain(void)systcm(〃colorfl");init();while(1){Loop:hotelTitle();printfC\n请选择:〃);j=scanf(〃%d〃,&k);if(j==O||k<l||k>5){printf(z,\n输入错误°\n\t请输入所列出的选项°\n\n3秒后刷新..・PleaseWeit!Thanks\n,z);fflush(stdin);sleep(3000);system(〃cls");gotoLoop;}else{switch(k){case1:hotelexecute();break;case2:t();brcak;case3:hotel_toteil();brcak;case4:hotcl_outhotcl();brcak;case5:outsystem();return;default:printf(zz\n\t系统出错!请联系管理员!\n〃);//怕出现BUGreturn;}}fflush(stdin);//清空缓存}}〃入住登记voidhotelexecute(){"intx,y,z;printf(z,请输入你耍住本酒店多少层楼的住房?【1-5】〃);fflush(stdin);L:scanf("%d",&x);p二x;if(x>5){printf(z/不好意思木店没有该层楼房。\n请重新选择:〃);gotoL;printfC请输入你要住第%€1层的几号房间?【1-5】〃,x);fflush(stdin);LP:scanf(〃%d〃,&y);if(y>5){printfC不好意思该层楼并无该房间。\n请重新选择:");gotoLP;//无条件的回去GOTO语句}if(x>2){//二层以上则100元一天printf(,z\n提示:该房是贵宾套房,100元一天\n〃);}else{printf(z,\n提示:该房是标准套房,50元一天\n〃);}if(roomEx-1][y-1]==0)//判断该房已经
酒店管理--酒店管理系统C语言版 来自淘豆网www.taodocs.com转载请标明出处.