Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please quick answer using C++ Umrah and Haj Company is running a promotion for its Umrah packages. It is giving discounts to clients based on

please quick answer using C++ image text in transcribedimage text in transcribedimage text in transcribed

Umrah and Haj Company is running a promotion for its Umrah packages. It is giving discounts to clients based on the number of people in each package and the duration of stay in Makkah and Madinah. Using the information given in the following table, write a C++ program that accepts from the users the number of people per package 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. Please notice the following 1. Your program should only accept valid number of people based on the below table. Otherwise, you should display "Invalid entry. Please enter a value between 1-6 people only". 2. Similarly, your program should check the input of the duration of stay within the range given in the table below and display the following message if the input is invalid. "Invalid entry. Duration of stay must be at least 1 and not more than 7. Duration of stay Package Number of People in the package 1-2 'S Normal Price (RM per person) 900 1500 2300 850 Discount (%) 3% 5% 7% 4% l' 'N' 'D' 3-4 7 days 14 days 21 days 7 days 14 days 21 days 7 days 14 days 21 days 'O' 1400 'U' 'F' 5-6 2100 800 1300 6% 8% 5% 7% 9% 'A' 'Z' 2050 Samples of Input and Output Sample 1: Enter number of people: 2 Enter duration of stay: 7 You have selected Package S. You are given a 3 % discount on the total initial amount. The total price for each person after discount is RM 873 The total number of people in this package is 2 persons The total amount to be paid for this package after discount is RM 1746 Sample 2: Enter number of people: 4 Enter duration of stay: 14 You have selected Package 0 . You are given a 6 % discount on the total initial amount. The total price for each person after discount is RM 1316 The total number of people in this package is 4 persons The total amount to be paid for this package after discount is RM 5264

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

Students also viewed these Databases questions

Question

=+8. Why is productivity important?

Answered: 1 week ago

Question

=+ 9. What is inflation and what causes it?

Answered: 1 week ago