Question: Assignment Task: A size (volume) of a jumbo candy bar with rectangular shape is Length x Width x Height cubic centimeters. Due to the rising

Assignment Task:

A size (volume) of a jumbo candy bar with rectangular shape is Length x Width x Height cubic centimeters. Due to the rising cost of coca, the management decided to reduce the volume of the candy bar. They decided to keep the Height the same but reduce the Length by 10% and the Width by 5%. Write a C++ program to output the following:

  • Original Length, Width, Height, and Volume of the candy bar.
  • Modified Length, Width, Height, and Volume of the candy bar. Note the Height remains unchanged.

Format your outputs to two decimal places, using fixed point notation.

Use good comments and coding style (layout) for your program. Good coding style includes using good vertical spacing between lines of code and horizontal indentation when applicable.

Include a header comment block at the top of your .cpp file, and in that, include your full name. the purpose of the program, and which compiler/IDE you have used.

You are free to use any C++ compiler/IDE you wish to use. Geany is available through Virtual Lab in Phillips 115. MS Visual Studio 2019 is available in Phillips 115.

Please submit your .cpp file on Canvas under the Assignment 2 folder. I will run your .cpp file to check for correctness and will also check for comments usage and goodness of program layout and readability.

Grading Breakdown:

  • Correctness of program? 20 points.
  • Good comments used? 5 points.
  • Good program layout? 5 points.

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!