Question: Write a Java code that asks the user to enter the radius r of a sphere, reads it, and calculate the volume and area

Write a Java code that asks the user to enter the radius r of a sphere, reads it, and calculate the volume 

Write a Java code that asks the user to enter the radius r of a sphere, reads it, and calculate the volume and area of the sphere as follows: Area = 4tr 4 3r The output should be as follows Volume = For this question, you should use Math function for doing the "power" and "n". When printing the volume and the area values, DON'T ENTER THEM MANUALLY (otherwise marks will be deducted). Only print 2 numbers after the decimal points. Enter the radius of the sphere: 10 The area of the sphere is: 1256.64 The volume of the sphere is: 4188.79

Step by Step Solution

3.56 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

It appears you are asking for a Java program that calculates the surface area and volume of a sphere ... View full answer

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 Programming Questions!