Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class AreaOfCylinder {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- double pi = 3.14159265358979;
- System.out.println("Enter Radius");
- double radius = sc.nextDouble();
- double radiusSQRD = radius * radius;
- System.out.println("Enter Height");
- double height = sc.nextDouble();
- double volume = pi * radiusSQRD * height;
- System.out.println("The Volume of cylinder is " + volume);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement