Customers can purchase a 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 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 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!
Customers can purchase a 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 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 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!
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...
Related questions
Question
Note it C++ coding
![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!](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fdd3494d7-16cb-4f96-a1a3-f69334a1e65b%2F6f954211-cb90-4d69-bd9f-be9048968c1b%2F1eu1sxl_processed.jpeg&w=3840&q=75)
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
![](/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 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning