Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize simple Hotel Management system with C language

Shulou Source: shulou.com Published: 2022-06-01 05:07:20 10月01日 Update

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

Tags: Input room selection system query between suite fee management room number situation time management system hotel luxury information business standard room standard room knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Huawei Linux Xiaomi Shulou Tech Info