Question 1 Write a C++ program that inputs the price of a shoe in a shop, then deducts the discount from the price of the shoe as follows: 20% discount if the price of the shoe is above or equal 40 BD. 10% discount if the price of the shoe is more than or equal 15 BD and less than 40 BD. 5% discount if the price of the shoe is more than or equal 7 BD and less than 15 BD. 0% discount if the price of the shoe is below 7 BD. Then, your program should output: The initial shoe price, the discount amount and the final shoe price after discount. All numbers should be displayed with 2 decimal places.
Question 1 Write a C++ program that inputs the price of a shoe in a shop, then deducts the discount from the price of the shoe as follows: 20% discount if the price of the shoe is above or equal 40 BD. 10% discount if the price of the shoe is more than or equal 15 BD and less than 40 BD. 5% discount if the price of the shoe is more than or equal 7 BD and less than 15 BD. 0% discount if the price of the shoe is below 7 BD. Then, your program should output: The initial shoe price, the discount amount and the final shoe price after discount. All numbers should be displayed with 2 decimal places.
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section4.5: A Case Study: Solving Quadratic Equations
Problem 5E: (Data processing) Years that are evenly divisible by 400 or are evenly divisible by 4 but not by 100...
Related questions
Question
![Test Content
Question 1
Write a C++ program that inputs the price of a shoe in a shop, then deducts the discount from the price of the shoe as
follows:
20% discount if the price of the shoe is above or equal 40 BD.
10% discount if the price of the shoe is more than or equal 15 BD and less than 40 BD.
5% discount if the price of the shoe is more than or equal 7 BD and less than 15 BD.
0% discount if the price of the shoe is below 7 BD.
Then, your program should output:
The initial shoe price, the discount amount and the final shoe price after discount.
All numbers should be displayed with 2 decimal places.
Use the editor to format your answer](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F28b83179-3bea-434e-892e-0abcd546a6b9%2F2dbf7db6-379d-4a3b-b7b1-26b31adf0155%2F06251k_processed.png&w=3840&q=75)
Transcribed Image Text:Test Content
Question 1
Write a C++ program that inputs the price of a shoe in a shop, then deducts the discount from the price of the shoe as
follows:
20% discount if the price of the shoe is above or equal 40 BD.
10% discount if the price of the shoe is more than or equal 15 BD and less than 40 BD.
5% discount if the price of the shoe is more than or equal 7 BD and less than 15 BD.
0% discount if the price of the shoe is below 7 BD.
Then, your program should output:
The initial shoe price, the discount amount and the final shoe price after discount.
All numbers should be displayed with 2 decimal places.
Use the editor to format your answer
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr