import java.util.Scanner;
public class ComputeArea2
{
public static void main(String args[])
{
final double PI=3.14159;
double area ;
//从键盘中获取圆的半径值;
double redius=0.0;
Scanner sc=new Scanner(System.in);
while (sc.hasNextDouble()){
redius=sc.nextDouble();
area= PI*redius*redius;
System.out.println("The area for the circle is"+area);
}
sc.close();
}
}
ComputeArea.java
最新推荐文章于 2021-03-14 10:13:55 发布