Hotel Maya

Hotel Maya is running a promotion for its room reservation packages. It is giving discounts to hotel guests based on the number of guests in a room and the duration of stay at the hotel. Using the information given in the following table, write a C++ program that accepts from the users the number of guests per room and the duration of stay, to determine and display the type of promotion package, the discount value and the total price for each package after discount.
Hint: Use your preferred nested selection to solve this problem.
Guest per room Duration of stay Package Normal Price
(RM per day) Discount (%)
1 1 – 2 days ‘S’ 150 3%
3 – 5 days ‘I’ 140 5%
More than 5 days ‘N’ 120 7%
2-3 1 – 2 days ‘D’ 200 3%
3 – 5 days ‘O’ 180 5%
More than 5 days ‘U’ 150 8%
4-5 1 – 3 days ‘F’ 250 5%
4 days or more ‘A’ 210 10%

The output of your program may look like the following:
Enter no of guest: 2
Enter duration of stay: 3
You have selected Package O.
You are given a 5% discount on hotel reservation.
The total price for this package after discount is RM513

The partial codes for the program to be developed is given in the response template below

×
New Download