Question: X319: sphereVolume Given an integer representing the radius of a sphere, compute and return the sphere's volume based on the following formula: Volume = 4/3

 X319: sphereVolume Given an integer representing the radius of a sphere,
compute and return the sphere's volume based on the following formula: Volume

X319: sphereVolume Given an integer representing the radius of a sphere, compute and return the sphere's volume based on the following formula: Volume = 4/3 x Pi x radius Examples: sphereVolume (5) -> 523.598775598 sphereVolume (12) -> 7238.229473871 public double sphereVolume(int radius) double v; v=((4/3)*(Math.PI))*radius*radius *radius; return v; public static void main(String [] args) { int radius; Scanner s=new Scanner(System.in); line 9: error: cannot find svmbol: class Scanner 1 public double sphereVolume (int radius) double v; v=((4/3)*(Math.PI))*radius*radius*radius; return v; 600 vau WN 7 public static void main(String [] args) { int radius; Scanner s=new Scanner(System.in); line 9: error: cannot find symbol: class Scanner radius=s.nextInt(); double volume=sphereVolume (radius); System.out.println(volume)

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!