Question: You are asked to write a C program to manage 10 hotel rooms using C structures to develop a hotel management system. Every room

You are asked to write a C program to manage 10 hotel rooms using C structures to develop a hotel management

You are asked to write a C program to manage 10 hotel rooms using C structures to develop a hotel management system. Every room should have the following details: room number, status (1 for reserved and 0 for vacant), customer details (username, last name, email address, address, and telephone number), check-in date, and check-out date. Your code should have a menu for these services: Transaction type?: B or b input all customer data User input Check in and check out date Transaction type?: V or v room number?: room number Transaction type?: E or el room number?: room number Transaction type?: C or c room number?: room number Transaction type?: R or r Transaction type?: E or e Room 1 2 3 4 5 6 7 8 9 10 Functions Book a room, user can book a room. Room should be vacant otherwise a message says "Room already booked" View customer details, prints the all-customer details in specified room. The following is the content of the hotel.txt file. Edit customer details, user can only edit information in booked room Check-out is only allowed if a room is booked. This function should return the status of the room to vacant. Additionally, it should print the user's bill for that room, calculated based on the number of days stayed (using a day rate of $50) between the check-in and check-out dates Print report. a user can print the information on the to file called hotel.txt Exit program Check-in date 4/30/2023 04/29/2023 Number of days 2 1 status Booked Vacant Vacant Vacant Booked. Vacant Vacant Vacant Vacant Vacant

Step by Step Solution

3.32 Rating (143 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

C Program to Manage 10 Hotel Rooms C include include include Structure to store room details typedef struct room int roomnumber int status 1 for reserved 0 for vacant char customername50 char customeremail50 char customeraddress100 char customerphone15 char checkindate15 char checkoutdate15 room Function to display the menu void displaymenu printfHotel Management System printf printf1 Book a room printf2 Check inout printf3 View customer details printf4 Edit customer details printf5 Check out printf6 Print report printf7 Exit printf printfEnter your choice Function to book a room void bookroomroom rooms int roomnumber printfEnter the room number you want to book scanfd roomnumber if roomsroomnumber 1status 1 printfRoom already booked return roomsroomnumber 1status 1 printfEnter customer ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!