@@ -0,0 +1,993 @@
+import java.io.BufferedReader;%0Aimport java.io.IOException;%0Aimport java.io.InputStreamReader;%0A/*%0A * The program calculates the volume of the ball.%0A */%0Apublic class BulletVolume %0A%7B%0A%09%0A%09private static double r, v;%0A%09public static void main(String%5B%5D args) %0A%09%7B%0A%09%09%0A%09%09%0A%09%09System.out.println(%22the program calculates the volume of the ball..%22 + %22%5Cn%22 + %22Displays the result with two decimal places.%22 +%0A%09%09%22%5Cn%22 + %22Enter the length of the radius r.%22);%0A%09%09BufferedReader scan = new BufferedReader(new InputStreamReader(System.in));%0A%09%09%0A%09%09try %0A%09%09%7B%0A%09%09%09r = Double.parseDouble(scan.readLine());%0A%09%09%09%0A%09%09%09//Calculation of the volume of the sphere.%0A%09%09%09v = 4*Math.PI*r*r*r/3;%0A%09%09%7D %0A%09%09catch (NumberFormatException e) %0A%09%09%7B%0A%09%09%09System.out.println(%22It's not a number. Give me a number.%22);%0A%09%09%09main(args);%0A%09%09%7D %0A%09%09catch (IOException e) %0A%09%09%7B%0A%09%09%09System.out.println(%22Give me a number.%22);%0A%09%09%09main(args);%0A%09%09%7D%0A%09%09System.out.print(%22Radius length: %22 + r + %22%5Cn%22 + %22The volume of the ball is: %22);%0A%09%09System.out.printf(%22%253.2f%5Cn%22, v);%0A%09%09%0A%09%7D%0A%0A%7D%0A

Add_to_math_BulletVolume