import java.util.Scanner; public class Main2 { public static void main(String[] args) { Scanner input = new Scanner(System.in); double radius = input.nextDouble();//圆的半径 double length = input.nextDouble();//圆的高度 double area = Math.PI* radius *radius; double volume =area * length; System.out.println("面积"+area+"---"+"体积"+volume); } }
时间: 2024-10-16 15:14:21