Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please..I need the answer in C++ as soon as possible..Thanks Umrah and Haj Company is running a promotion for its Umrah packages. It is giving

image text in transcribed

image text in transcribed

image text in transcribed

Please..I need the answer in C++ as soon as possible..Thanks

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 Normal Price (RM per person) 900 1500 2300 850 3-4 7 days 14 days 21 days 7 days 14 days 21 days 7 days 14 days 21 days 'S l' 'N' 'D' 'O 'U' 'F' 'A' 'Z Discount (%) 3% 5% 7% 4% 6% 8% 5% 7% 9% 5-6 1400 2100 800 1300 2050 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 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

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

More Books

Students also viewed these Databases questions