fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Ideone
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. double a, V, S;
  10. Scanner in = new Scanner(System.in);
  11. a = in.nextDouble();
  12. V = a*a*a;
  13. S = 6*a*a;
  14. System.out.println(V);
  15. System.out.println(S);
  16. }
  17. }
Success #stdin #stdout 0.13s 31124KB
stdin
1.7
stdout
4.912999999999999
17.34