77范文网 - 专业文章范例文档资料分享平台

简易酒店管理系统代码

来源:网络收集 时间:2019-03-10 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

#include #include #include #include

//时间函数的定义

struct tm *localtime(const time_t * timep);

//时间的初始化

char *wday[]={\星期天\星期一\星期二\星期三\星期四\星期五\星期六\ time_t timep; struct tm *now; struct tm *after; // time(&timep);

//酒店房间的定义 struct house { char house_number[10]; char house_shape[2]; float house_price; int sum_person; // struct house *next; }h[10]= { {\ {\ {\ {\ {\ {\ {\ {\ {\ {\};

struct guest { //住客姓名、性别、年龄、身份、身份证号码,房号,床号,入住日期、入住时间、离店日期、离店时间。 char name[10]; char sex[6]; int age; char identify[18]; char identify_number[18]; char room[10]; char bed[10]; // Date guest_in; // Date guest_out; struct tm *p; struct tm *q; struct guest *next; };

void first_inquiry() { int i=0; int n=0; char ch[2]=\ for (i=0;i<10;i++) { if ((strcmp(h[i].house_shape,ch)==0)) { if (h[i].sum_person==0) { printf(\ } } } }

void second_inquiry() { { int i=0; int n=0; char ch[2]=\

for (i=0;i<10;i++) { if ((strcmp(h[i].house_shape,ch)==0)) { if (h[i].sum_person==0) { printf(\ } } } } }

void third_inquiry() { int i=0; int n=0; char ch[2]=\ for (i=0;i<10;i++) { if ((strcmp(h[i].house_shape,ch)==0)) { if (h[i].sum_person==0) { printf(\ } } } }

void lookfor_house_is_Null() { int your_choice; do { printf(\你要查询:1.单人间 2.双人间 3.多人间 4.退出:\\n\ printf(\输入你的选择:\\t\

scanf(\ switch(your_choice) { case 1: printf(\单人间的空余房间:\\t\ first_inquiry(); printf(\ break; case 2: printf(\双人房的空余房间:\\t\ second_inquiry(); printf(\ break; case 3: printf(\多人间的空余房间:\\t\ third_inquiry(); printf(\ break; case 4: // exit(1); break; } } while(your_choice!=4); printf(\ printf(\ }

void add_house_sum_number(char str[10]) { int i=0; for (i=0;i<10;i++) { if ((strcmp(h[i].house_number,str)==0)) {

h[i].sum_person=1; } else { continue; } } }

typedef struct guest * link_guest;

//创建

link_guest create_guest(void) { link_guest head=(link_guest)malloc(sizeof(struct guest)); if (head!=NULL) { head->next=NULL; } else { printf(\ } return head; }

bool is_null_guest(link_guest head) { if(head->next==NULL) { return true; } return false; }

//写个函数判断一下 当输入住客的房号时,是否还有个这个房间 bool is_null_this_house(char str[10]) { int i=0;

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库简易酒店管理系统代码在线全文阅读。

简易酒店管理系统代码.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/513087.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: