Question: Write a Program: Daily Supplement Cost Your horse has to have 1 ounce of probiotic supplement a day. You can buy it per pound, as

Write a Program: Daily Supplement Cost Your horse has to have 1 ounce of probiotic supplement a day. You can buy it per pound, as a 10 lb pail at a 10% discount, or as a 20 lb pail at a 15% discount. Your goal is to produce formatted output showing the daily cost for each buying option. You should ask the user to enter the price per lb.

You should have 4 comment lines at the top: description of the program, author, section, and date. (1 point)Create as many variables as you need, use the appropriate type, name them appropriately (camelback notation preferred), and remember to not leave them uninitialized. (2 points)Create named constants for whats appropriate. Keep in mind the two rules for named constants: they need to have a well-defined meaning that you can express in a name, and they should be unlikely to change. Use the standard convention for constant names. (3 points)Ask the user to enter a price per lb and read it from the console. (1 point)Calculate the daily cost for each buying option. Use your knowledge of operator precedence and only use parentheses as appropriate (3 points)Write the result to the console. Use stream manipulators to format your output. Your cost per day should be displayed as a table with evenly spaced aligned columns. You should also use the fixed-point notation with two digits after the decimal point. Your output should look similar to this: (5 points)Enter price per lb: $18.50 Buying option 1 lb 5 lb 10 lb Cost per day ($) 1.16 1.04 0.98 Notes: Pay attention to where you create and how you initialize your variables. Unsafe code is a 1-point deduction. Comment your code. Uncommented code is also a 1-point deduction. Refer to code examples published for this week.

i need this coded in C++

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!