Question: Modify the provided Lab 1 Program.cpp such that the program asks the user to enter the length, width and height of a cardboard box and

 Modify the provided "Lab 1 Program.cpp" such that the program asks

Modify the provided "Lab 1 Program.cpp" such that the program asks the user to enter the length, width and height of a cardboard box and the radius of a basketball. Then, use the following formulas to find how many basketballs you can fit in the box, compute the left over space in the box and print it to the console (screen). Volume of a Cardboard box = (length*width * height) Volume of a Basketball = (4/3) * 3.142 " (radius) Sample Input/Output: Enter the width of a cardboard box: 50 Enter the height of the cardboard box: 40 Enter the length of the cardboard box: 60 Enter the radius of a basketball: 10 Number of basketballs that can fit in the cardboard box: 28 Remaining space in the cardboard box: 2698.667 Do not use any libraries we have not yet learned (i.e. cmath). Only modify the lines marked as //TODO. Attach your modified code file as your submission to this

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!