/home/caleb/ASDV-Java/MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/Cylinder.java
/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.calebfontenot.mp1_calebfontenot;

import java.util.Scanner;

/**
 *
 * @author caleb
 */
public class Cylinder {
    public static void main(String[] args)
    {
        Scanner input = new Scanner(System.in);
        
        // Enter radius of the cylinder
        System.out.print("Enter the radius and length of a cylinder: ");
        double radius = input.nextDouble();
        double length = input.nextDouble();
        
        // Compute area and volume
        double area = radius * radius * 3.14159;
        double volume = area * length;
        
        // Display result
        System.out.println("The area is " + area);
        System.out.println("The volume of the cylinder is " + volume);
        
    }
}