Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanner input = new Scanner(System.in);
- double volume;
- double radius;
- double height;
- double cost;
- boolean done = false;
- while(!done){
- System.out.println("Input the Volume");
- volume = input.nextDouble();
- System.out.println("Input the radius");
- radius = input.nextDouble();
- height = volume / (Math.PI*radius*radius);
- cost = 2*Math.PI*radius(radius + height);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement