下载此文档

C语言课程设计---酒店房间登记与计费管理系统源代码.docx


文档分类:IT计算机 | 页数:约60页 举报非法文档有奖
1/60
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/60 下载此文档
文档列表 文档介绍
#define M 80
#include<> #include<> #include<>
/* 函数声明 */
void check_in();
/*
登记入住函数
void chamber();
/*
入住情况函数
void price();
/*
当前费用函数
void fee();
/*
结账退房函数
void infor();
/*
信息查询函数
void save(int);
/*
保存信息函数
void read(int);
/*
读取信息函数
*/
*/
*/
*/
*/
*/
*/
int judge_year(int); /*
判断闰年函数 */
void information(); /*
输出全部房间信息 */
/* 结构体 */ struct time {int year; int mon; int date; int hour;
};
struct room /*
定义各房间信息的结构体 */
{char name[40];
char ID[18];
int flag; /* 0- 无人入住, 1-按小时计费, 2-
按天计费 */
long int deposit;
time t[2]; /* 0- 入住时间, 1- 当前时间 */
}room[M];
char c1[40]={0};
char c2[18]={0};
/* 主函数(主界面) */
void main()
{system("cls"); /* 清屏 */
system("color 4E");
int n;
);
****************************************H
printf("**
);
printf("**\t\t
欢迎光临万豪酒店
printf(
*\n\n");
);
printf("**
);
H****************************************
printf("\t\t\t [ 1.
printf("\t\t\t [ 2.
printf("\t\t\t [ 3.
printf("\t\t\t [ 4.
printf("\t\t\t [ 5.
登记入住 ]\n\n"); 入住情况 ]\n\n"); 当前费用 ]\n\n"); 结账退房 ]\n\n"); 信息查询 ]\n\n");
***************************************
printf("\t\t\t [ 6. 全部信息 ]\n\n");
printf("\t\t\t [ 7. 退出系统 ]\n\n");
printf(" 请输入您需要的服务的代码: "); scanf("%d",&n);
while(n<1||n>7)
{printf("\n\n 代码输入有误,请您重新输入: ");
scanf("%d",&n);
}
switch(n) /* 根据输入数 字选择功能 */
/*
调用房间情
{case 1:check_in();break; /* 调用登记 入住函数 */
case 2:chamber();break;
况函数 */
费用函数 */
case 4:fee();break; /*
房函数 */
case 5:infor();break; /*
查询函数 */
case 6:information();break; /*
信息函数 */
case 7:exit(0); /* 统函数 */
}
}
/* 查看房间使用情况函数 */
调用结账退
调用信息
调用全部
调用退出系
void chamber()
system("color 4E");
printf("\n**********************************
使用情况
**********************************
\n");
int count=0;
int i;
int j;
int k;
int m;
统计未入住房
for(i=1;i<=80;i++) /* 间总数 */
{read(i);
if(room[i-1].flag==0)
count++;}

C语言课程设计---酒店房间登记与计费管理系统源代码 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数60
  • 收藏数0 收藏
  • 顶次数0
  • 上传人dlmus1
  • 文件大小81 KB
  • 时间2020-11-14