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
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 21PE
icon
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!
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
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr