In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, the editor will share with you the relevant knowledge points about how to implement a simple hotel management system in C language. the content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article, let's take a look at it.
I. description of the problem
The system should have the following main functions: check-in: enter check-in information from the keyboard: number of room floors, room number, etc.; query check-in status, query current fees, check out, exit the system and other functions.
II. Basic requirements
(1) check in. You can input multiple information to initialize the data of the system.
(2) list all check-in information, which can be used for customer inquiry and check-in procedures.
(3) query the current fee: display the customer's real-time fee, so that it is convenient for the customer to inquire and pay when checking out.
(4) check out: go through the check out procedure, modify the information in the system, and empty the customer's house.
(5) exit the system: the added, deleted and modified data of the information in this operation is written into the file, saved and exited.
# include#include#include / / the time to call the system, and calculate the cost through the increase or decrease of time # include#include#define N 10#define HOURROOM 10#define NORMALROOM 120#define BIGROOM 300#define WORTHROOM 500#define GREATROOM 800struct room_message {int number; / / room number int people; / / with or without check-in int floor; / / number of floors (different types of rooms on different floors) time_t time / / check-in time, empty if unoccupied} ROOM; void BuildRoom () {/ / create room function, initialize data on the system FILE * fp=NULL; int iMagazine j; if ((fp=fopen ("roommessage.dat", "r")) = = NULL) {fp=fopen ("roommessage.dat", "w"); for
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.