2. Party shop sells birthday gift bags in two ways. set of 12 bags for $17.99 or an individual bag for $1.75. complete program that asks the user input for the number of gift bags need Customers can purchase a Write a to be purchased (an integer) and outputs the total price of the purchase. a) For example, if the customer buys 14 gift bags, the customer would be charged for 1 set of (12 bags) plus another 2 individual bags. The subtotal would be 1 (17.99) + 2 (1.75) = $21.49. b) Use a constant variable to set a fixed tax rate of 8.875. c) Display correct dollar values (2 decimal places, use cout precision). User input can be any content and it's bold and italicized for clarity. Example Output 1 Welcome to Party Shop! How many gift bags would you like to purchase: 14 SHOPPING CART 1-set (s) $17.99

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 20PE: When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making...
icon
Related questions
Question
2. Party shop sells birthday gift bags in two ways.
set of 12 bags for $17.99 or an individual bag for $1.75.
Customers can purchase a
Write a
complete program that asks the user input for the number of gift bags need
to be purchased (an integer) and outputs the total price of the purchase.
a) For example, if the customer buys 14 gift bags, the customer would be
charged for 1 set of (12 bags) plus another 2 individual bags.
The
subtotal would be 1 (17.99) + 2 (1.75) = $21.49.
b) Use a constant variable to set a fixed tax rate of 8.875.
c) Display correct dollar values (2 decimal places, use cout precision).
User input can be any content and it's bold and italicized for clarity.
Example Output 1
Welcome to Party Shop!
How many gift bags would you like to purchase: 14
SHOPPING CART
1-set (s)
$17.99
2-individual
$3.50
Subtotal:
$21.49
Таx:
$1.91
Total:
$23.40
Thank you shopping Party Shop!
Example Output 2
Welcome to Party Shop!
How many gift bags would you like to purchase: 11
SHOPPING CART
0-set (s)
$0.00
2-individual
$19.25
Subtotal:
$19.25
Таx:
$1.71
Total:
$20.96
Thank you shopping Party Shop!
Transcribed Image Text:2. Party shop sells birthday gift bags in two ways. set of 12 bags for $17.99 or an individual bag for $1.75. Customers can purchase a Write a complete program that asks the user input for the number of gift bags need to be purchased (an integer) and outputs the total price of the purchase. a) For example, if the customer buys 14 gift bags, the customer would be charged for 1 set of (12 bags) plus another 2 individual bags. The subtotal would be 1 (17.99) + 2 (1.75) = $21.49. b) Use a constant variable to set a fixed tax rate of 8.875. c) Display correct dollar values (2 decimal places, use cout precision). User input can be any content and it's bold and italicized for clarity. Example Output 1 Welcome to Party Shop! How many gift bags would you like to purchase: 14 SHOPPING CART 1-set (s) $17.99 2-individual $3.50 Subtotal: $21.49 Таx: $1.91 Total: $23.40 Thank you shopping Party Shop! Example Output 2 Welcome to Party Shop! How many gift bags would you like to purchase: 11 SHOPPING CART 0-set (s) $0.00 2-individual $19.25 Subtotal: $19.25 Таx: $1.71 Total: $20.96 Thank you shopping Party Shop!
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Constants and Variables
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning