Java 代码
import java.util.Scanner;
public class Main
{
static final double PI = 3.14159;
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
double r = cin.nextDouble();
double A = PI * r * r;
System.out.println ("A=" + String.format("%.4f", A));
}
}