Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a program that compares the unit prices for two sizes of laundry detergent sold at a grocery store. Console Price Comparison Price of 64
Create a program that compares the unit prices for two sizes of laundry detergent sold at a grocery store.
Console
Price Comparison
Price of 64 ounce size: 5.99
Price of 32 ounce size: 3.50
Price per ounce (64 oz): 0.09
Price per ounce (32 oz): 0.11
Specifications
- The formula for calculating price per ounce is:
price per ounce = price / ounces
- The number of ounces for the comparison should be 64 and 32, but the code should store this data in two variables. That way, you can easily change the number of ounces for each comparison later, just by changing the value thats stored in each variable.
- The program should round the results to a maximum of two decimal places.
- Assume the user will enter valid data.
- I need it in C++
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started