Question: 5) Write a JavaScript script that will ask the user to enter in the length of the side of a cube. (all the sides of

5) Write a JavaScript script that will ask the user to enter in the length of the side of a cube. (all the sides of a cube are equal) Based on the value that is entered by the user from the keyboard, calculate each of the following and assign your results to variables. 1. volume of the cube 2. surface area of the cube 3. volume of the largest sphere that could fit in the box. 4. surface area of the largest sphere that could fit in the box. 5. volume of the space in between the cube and the sphere. HINT: the largest sphere that could fit in the box will have a diameter equal to the side of the cube. ANOTHER HINT: to find the volume in between the cube and sphere you should subtract volumes. in case you forgot the sphere formulas, they are: volume of sphere = 4/3 Pi r3 surface area of sphere = 4 Pi r2 Your script should output HTML text that displays the results of your calculations.

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!