📜  Java 编程中的圆的面积 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:16.964000             🧑  作者: Mango

代码示例1
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        double R,A;
        Scanner sc = new Scanner(System.in);
        R = sc.nextDouble();
        A = 3.14159 * R * R;
        System.out.printf("A=%.4f\n",  A);
   }
}