计算圆的面积

来源:互联网 发布:最新版广联达预算软件 编辑:程序博客网 时间:2024/04/28 22:41


public class SC
{
 public static void main(String args[])
 {
  final double PI =3.14159;
  double area;
  area = PI * 9 * 9;
  System.out.println("The area for the circle of 9 is " + area);
 }   
    
}

 

 

 

 

The area for the circle of 9 is 254.46879
运行的结果
0 0
原创粉丝点击