Computer Science, asked by nasreenayesha086, 7 months ago

The volume of a sphere is calculated by using formula:v = (4/3)*(22/7)*r3Write a program to calculate the radius of a sphere by taking its volume as an input.Hint: radius = ∛(volume * (3/4) * (7/22))​

Answers

Answered by Oreki
5

import java.util.Scanner;

public class Circle {

public static void main(String[ ] args) {

System.out.print("Enter the volume of the Sphere - ");

double volume = new Scanner(System.in).nextDouble( );

System.out.println("Radius of the Sphere - " + Math.cbrt(volume * (3d / 4d) * (Math.PI)));

}

}

Answered by ankitha543
0

Answer:

Import java.util.Scanner;

public class Circle

{

        public static void main(String[ ] args)

                {

                 System.out.print("Enter the volume of the Sphere - ");

                 double volume = new Scanner(System.in).nextDouble( );

                 System.out.println("Radius of the Sphere - " + Math.cbrt(volume * (3d / 4d) * (Math.PI)));                                                                            

                }

}

HOPE IT HELPS

Similar questions