Question: IN C# - Problem #2: Lets make a deal In this problem we will determine if it is cheaper to buy items in a bulk

IN C# - Problem #2: Lets make a deal In this problem we will determine if it is cheaper to buy items in a bulk pack or individually with a coupon. You will prompt the user for the number of items in the bulk pack. Then prompt the user for the cost of the bulk pack. Use these 2 values and calculate the cost of (1) item. Now we will figure out the coupon price. The coupon only works for an individual item, not on the bulk packs. Ask the user for the cost of an individual item. Then prompt the user for the dollar amount off that the coupon is for. Use these two values and calculate the price of the (1) with coupon. Now compare the 2 individual prices to see which one costs less. Give the final results to the user and tell them to choose the cheaper option. Make sure you are validating each user prompt and storing them in the correct variable data type.

User Input: o Number of items in the bulk pack o Cost of bulk pack o The cost of the individual item o Coupon value (Amount of money off)

Result To Print Out: o If the individual cost in the bulk pack is cheaper:

Thecostof1iteminthebulkpackis$X,whichischeaperthanthecost of the individual item with coupon, which is $Y. Buy the bulk pack!

o If the individual cost in the one item with coupon is cheaper: Thecostof1itemusingacouponis$X,whichischeaperthanthecost

of the individual item from the bulk pack, which is $Y. Buy the individual

item and use the coupon!

Data Sets to Test: o Number of items in bulk pack = 50, Cost of bulk pack = 100.00, Cost of individual

item = 4.50, Coupon Value = 1.00 off ResultThecostof1iteminthebulkpackis$2.00,whichischeaper

than the cost of the individual item with coupon, which is $3.50. Buy the bulk pack!

o Number of items in bulk pack = 20, Cost of bulk pack = 80.50, Cost of individual item = 6.25, Coupon Value = 2.25 off

ResultThecostof1itemusingacouponis$4.00,whichischeaper than the cost of the individual item from the bulk pack, which is $4.025. Buy the individual item and use the coupon!

o Test One Of Your Own. All 3 of these tests must be in your code in a multi-lined comment. They must not be copy and pasted and they must match your programs output.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!