Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Programming Problem 2 - File Name coupon.cpp (5 pts.) Description: (Use Switch Statement) Food delivery applications use coupon cookies to increase their, (also referred

image text in transcribed C++
image text in transcribed
Programming Problem 2 - File Name coupon.cpp (5 pts.) Description: (Use Switch Statement) Food delivery applications use coupon cookies to increase their, (also referred to as promotiorul codes). It is also considered as very effective way of atracting new customers, Centemers need to save their money, so the most conventional method is by using promotion codes. XYZ is a food application app which retirely offers promo codes that allow customers to serve cash on their archers. It provides the following promotion codes Promotional Code 1. Fee Delivery 2 15 % Discount 3. 30%Chuck 1. If the customer chose the free delivery code, then the delivery price which is 13 SR will be deducted from the total bill. 2- If the astoner chose the 15% discount, then 15% will be applied on the total bill. The total price after discount calculated as follows: Price after discount total price - (lotal price 15/100) 3. If the customer chose the 30% cashback, then 30 of the total will be umed to the Cestomer's account. The amount of cashback is (total bill * 30/100) Input Format: The first line consists of single imteger dereting the type of promotional code The second line consists of single float presenting the tool Gillammut Example Input Choose the promotional code 1 - Free Delivery 2-151 Discount 3-30 Cathback Enter your choice Enter your bets amounts 28.5 Output Format Forced print the bill att lying the code. Forse peint the check Example Output Your bounter applying the code Page 5 CS120 Practical het schilders Example Program Execution TO pro EUR Free Delivery -15DISCOUNT 21. Cashback Enter your choice Enter your bu amant 7,5 wuur 0111 after applying the code Description: (Use Switch Statement) Food delivery applications use coupon codes to increase their, (also referred to as promotional codes). It is also considered as very effective way of attracting new customers. Customers need to save their money, so the most conventional methods is by using promotional codes, XYZ is a food application app which routinely offers promo codes that allow customers to save cash on their orders. It provides the following promotional codes: Promotional Code 1- Free Delivery 2- 15 % Discount 3- 30% Cashback 1. If the customer chose the free delivery code, then the delivery price which is 13 SR will be deducted from the total bill. 2- If the customer chose the 15% discount, then 15% will be applied on the total bill. The total price after discount calculated as follows: Price after discount = total price (total price * 15/100) 3. If the austomer chose the 30% cashback, then 30% of the total bill will be retumed to the customer's account. The amount of cashback is (total bill * 30/100) Input Format: The first line consists of single integer denoting the type of promotional code. The second line consists of single float representing the total bill amount. Example Input Choose the promotional code: 1- Free Delivery 2- 156 Discount 3- 300 Cashback Enter your choice: 1 Enter your bill amount: 78.5 Output Format For case 1 and 2 print the hill amourt after applying the code. For case 3 print the cashback amourt. Example Output Your ball amount after applying the code is : 65.5 Page 15

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

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions