import java.util.Scanner;
public class ComputeAreaWithConsoleInput {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter a number for radius:");
double radius = input.nextDouble();
double area = radius * radius * 3.14159;
System.out.println("The area for the circle of radius " +
radius + " is " + area);
}
}
(每日一java)ComputeAreaWithConsoleInput
最新推荐文章于 2021-06-17 23:34:34 发布