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
1.9 KiB
85 lines
1.9 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();//选择1
|
|
int change2();//选择2
|
|
void query_o();//指定查询
|
|
extern int qty;
|
|
int qty=10;
|
|
struct room /*缁撴瀯浣撴暟缁刬nf*/
|
|
{
|
|
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;}
|