题解 | #计算球体的体积#
计算球体的体积
http://www.nowcoder.com/practice/0f5d9bfcd63b47fda2052a583b1fbd1f
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
double radius = in.nextDouble();
double pi = 3.1415926;
double volume = 4 * pi * Math.pow(radius, 3) / 3;
System.out.printf("%.3f", volume);
}
}