Skip to content

Instantly share code, notes, and snippets.

@folivetti
Created February 17, 2017 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save folivetti/0b4ec9080ed4926b19a18e0549110313 to your computer and use it in GitHub Desktop.
Save folivetti/0b4ec9080ed4926b19a18e0549110313 to your computer and use it in GitHub Desktop.
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
double raio, volume;
Scanner sc = new Scanner(System.in);
raio = sc.nextDouble();
volume = (4/3.0)*3.14159*Math.pow(raio, 3);
System.out.printf("VOLUME = %.3f\n", volume);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment