package chaper2;
import java.util.Scanner;
/**
* 通过输入半径和高求圆柱体的体积
* V=S底面积*H高
* @author siyihe
* @create 2022-06-23 12:55
* @project javaexec0
*/
public class Cylinder {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("Enter thr radius and length of a cylinder:");
double radius=input.nextDouble();
double length=input.nextDouble();
double area= Math.PI*radius*radius;
double volume=area*length;
System.out.println("The area is "+area);
System.out.println("The volume is "+volume);
}
}
11-11
1915
