c语言大作业酒店管理系统,C语言酒店管理系统(最新整理)

本文介绍了一个使用C语言实现的简易酒店管理系统。系统包括入住登记、查询住房信息、总账结算等功能,并采用清晰的代码结构和良好的用户交互界面。通过GOTO语句控制流程,实现了基本的酒店业务管理。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

《C语言酒店管理系统(最新整理)》由会员分享,可在线阅读,更多相关《C语言酒店管理系统(最新整理)(7页珍藏版)》请在人人文库网上搜索。

1、include#include #include #include/成员变量的声明int i,j,k,p=0;char temp=;int room55; clock_t start;/成员方法的声明void init()int x,y,z; for(x=0;x5)printf(n 输入错误。nt 请输入所列出的选项。nn 3 秒后刷新.Please Weit! Thanksn); fflush(stdin);sleep(3000); system(cls); goto Loop;else switch(k)case 1:hotel_execute();break; case 2:hotel_。

2、select();break; case 3:hotel_total();break; case 4:hotel_outhotel();break; case 5:outsystem();return; default:printf(nt 系统出错!请联系管理员!n);/怕出现 BUG return;fflush(stdin); /清空缓存/入住登记void hotel_execute()int x,y,z;printf(请输入你要住本酒店多少层楼的住房?【1-5】); fflush(stdin);L:scanf(%d,&x); p=x;if(x5)printf(不好意思本店没有该层楼房。n 。

3、请重新选择:); goto L;printf(请输入你要住第%d 层的几号房间?【1-5】,x); fflush(stdin);LP:scanf(%d,&y); if(y5)printf(不好意思该层楼并无该房间。n 请重新选择:); goto LP;/无条件的回去 GOTO 语句if(x2)/二层以上则 100 元一天printf(n 提示:该房是贵宾套房,100 元一天n);elseprintf(n 提示:该房是标准套房,50 元一天n);if(roomx-1y-1=0)/判断该房已经入住roomx-1y-1=1;printf(n 谢谢您的光临,您已经成功登记。n 您的信息如下:n 入住房。

4、间:%d-%dn,x,y); start=clock();elseprintf(警告:该房已经有人入住.请换房入住哈。n);/查询住房信息void hotel_select()int x,y,z;system(cls);/清空内容。/以下没什么重要的。就是控制输出格式printf(宾馆入住情况如下:);printf(n|-|-|-|-|-|n);printf(|); for(x=1;x2) total=day*100; if(day=0) total=100;printf(n 我们旅店是按包天计费的。n 若按小时,您需要付%f 元,但是现在你要付 100元(黑店哈哈)n,total);/这种计。

5、费方式比较现实。符合实际else total=day*50;if(day=0)total=50;printf(n 我们旅店是按包天计费的。n 若按小时,您需要付%f 元,但是现在你要付 50元(黑店哈哈)n,total);/退出void outsystem()char message = n 酒店登记计费系统.打造酒店中的名牌;for(i=0;istrlen(message);i+)printf(%c,messagei); sleep(30);/睡眠 30 毫秒。printf(nn);/1.本系统未用到文件/2.本系统采用函数/3.本系统用例比较小/4.本系统有良好的界面,舒适的变成思路和整齐。

6、的代码。/5.本程序引用一个时间进程另外控制时间。/6.感谢所有关心我和我关心的人。/7.再会。“”“”At the end, Xiao Bian gives you a passage. Minand once said, people who learn to learn are very happy people. In every wonderful life, learning is an eternal theme. As a professional clerical and teaching position, I understand the importance of co。

7、ntinuous learning, life is diligent, nothing can be gained, only continuous learning can achieve better self. Only by constantly learning and mastering the latest relevant knowledge, can employees from all walks of life keep up with the pace of enterprise development and innovate to meet the needs of the market. This document is also edited by my studio professionals, there may be errors in the document, if there are errors, please correct, thank you。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值