You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
2.0 KiB
85 lines
2.0 KiB
#include<stdio.h>
|
|
#include<stdlib.h>
|
|
#include<time.h>
|
|
#include<conio.h>
|
|
#include<string.h>
|
|
#define len sizeof(inf)
|
|
void main_page();/*界面函数*/
|
|
int select_();/*选择函数*/
|
|
void qingping();/*清屏函数*/
|
|
void query_r();/*房间信息查询函数*/
|
|
int loading();/*读取函数*/
|
|
int saving();/*保存函数*/
|
|
int feiyongjisuan(char fangjianhao[10],int shijiancha_ri,int shijiancha_xiaoshi);//费用计算
|
|
void reroom();/*退房函数*/
|
|
int xitongshijian(int *i,int *o,int *l);/*时间函数*/
|
|
int feiyongchaxun();/*费用查询函数*/
|
|
void register_();/*登记入住函数*/
|
|
void delete_();/*删除函数*/
|
|
void setting();/*新建函数*/
|
|
void shijianshu(char fangjianhao[10],int *p,int *o);//时间差
|
|
int change1();//修改函数
|
|
int change2();//查询函数
|
|
void query_o();//单个查询
|
|
extern int qty;
|
|
int qty=10;
|
|
struct room /*结构体数组inf*/
|
|
{
|
|
char num[10]; /*房间号*/
|
|
char human[10]; /*单双人*/
|
|
char kind[10]; /*类型*/
|
|
char inout[10]; /*是否有人入住*/
|
|
int time[3];/*时间*/
|
|
}inf[99];
|
|
int main()
|
|
{
|
|
|
|
select_();
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
void main_page() /*界面函数
|
|
|
|
*/
|
|
{ system("cls");
|
|
printf(" \n* 酒店管理系统主界面 *\n");
|
|
printf(" \n* 1.房间信息查询 *\n");
|
|
printf(" \n* 2.房间信息修改 *\n");
|
|
printf(" \n* 3. 登记入住 *\n");
|
|
printf(" \n* 4. 费用查询 *\n");
|
|
printf(" \n* 5. 退房 *\n");
|
|
printf(" \n* 6. 退出程序 *\n");
|
|
printf("请选择\n");
|
|
|
|
|
|
}
|
|
|
|
|
|
int select_() /*选择函数*/
|
|
{
|
|
|
|
int n;
|
|
main_page();
|
|
scanf("%d",&n);
|
|
while(n)
|
|
{switch(n)
|
|
{
|
|
case 1:change1() ;break;
|
|
|
|
|
|
case 2:change2() ;break;
|
|
case 3:register_() ;break;
|
|
case 4: feiyongchaxun();break;
|
|
case 5:reroom();break;
|
|
case 6: return 0;
|
|
}
|
|
printf("按任意数返回");
|
|
getch();
|
|
main_page();
|
|
scanf("%d",&n);
|
|
}
|
|
return 0;}
|