Question: WRITE IN C PROGRAM, PLEASE, THANK YOU Ex4: Structure and Functions (25pts) Write a C program that: - define a structure date which includes day

WRITE IN C PROGRAM, PLEASE, THANK YOU

WRITE IN C PROGRAM, PLEASE, THANK YOU Ex4: Structure and Functions (25pts)

Write a C program that: - define a structure date which includes

Ex4: Structure and Functions (25pts) Write a C program that: - define a structure date which includes day (dd), month (mm), year yyyy) formatted as dd/mm/yyyy. - define a structure visitor which includes Item (Variable Name) Date Type Note First Name (frame) char (array) (just one word only) max. 20 characters Last Name (Iname) char (array) (just one word only) max. 20 characters Date of Birth (dob) date (structure) Number of Nights (night) int Room Type (room) Type 1: $25ight int Type 2: $15ight - define a function print_bill which receives an array of visitor and a visitor ID3. The function will print the bill confirmation for a given visitor. - develop a main program which creates a list of 25 visitors. The program will read the information registration of visitors at the Raja Casablanca Hotel until the hotel rooms are full (suppose that the number of rooms is 25). In this case, print the message Our sincere apology! The hotel is full. No more room is available!"). - at the end, the program should ask for a visitor ID to print the bill confirmation (call the function defined above). Example output: Welcome to Golden Spoon Hotel... First name: Jerry Last name: Daniel Date of birth: 01/10/1990 How many nights will you stay? 4 Room type? 1 Do you want to continue? y Welcome to Golden Spoon Hotel... First name: Marco Last name: Italiano Date of birth: 25/06/1995 How many nights will you stay? 3 Room type? 2 Do you want to continue? y (till the last visitor) Print confirmation: 2 Visitor ID: 2 Full name: Marco Italiano Date of birth: 25/06/1995 Number of nights: 3 Room type: 2 Total bill: $45 End of Exam

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!