Advertisement
waytoofoxy

Untitled

Mar 29th, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1.         Scanner input = new Scanner(System.in);
  2.         double volume;
  3.         double radius;
  4.         double height;
  5.         double cost;
  6.         boolean done = false;
  7.         while(!done){
  8.             System.out.println("Input the Volume");
  9.             volume = input.nextDouble();
  10.             System.out.println("Input the radius");
  11.             radius = input.nextDouble();
  12.             height = volume / (Math.PI*radius*radius);
  13.             cost = 2*Math.PI*radius(radius + height);
  14.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement