Question: Write a program that calculates the total charges for booking rooms at a hotel. The hotel charges different prices for a room depending on the
Write a program that calculates the total charges for booking rooms at a hotel. The hotel charges different prices for a room depending on the type of room, the number of people and the number of days according to the following policy:
For a regular room: the basic charge for up to two travelers is $ per day. Every additional person is $ per person per day.
For a deluxe room: the basic charge for up to two travelers is $ per day. Every additional person is $ per person per day.
For example, the charge for a regular room for people for days will be $ for the first two travelers and $ for the third traveler, giving total of $ The charge for a deluxe room for a single person for a single day will be $ See sample run below.
Specifically, write a program that
Welcomes the user to the Bellevue Inn.
Asks the user for
the type of the room ASSUME USER ENTERS VALID INPUT: R r D or d
the number of travelers ASSUMER USER ENTERS A POSITIVE INTEGER
the number of days ASSUMER USER ENTERS A POSITIVE INTEGER
No need to validate inputs
Prints the charge for that room and the total charge so far.
Prompts the user if she wants to continue with more input.
If user enters y or Y repeats steps again, otherwise, ends the program by printing the final total charge and prints Bye
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
