求圆的周长和面积

时间:2016-09-10 22:02:09   收藏:0   阅读:128

package qiuyuan;

public class Yuan1
{

public static void main(String[] args)
{
int r=3;
final double PI=3.14;
double z=PI*2*r;
double s=PI*Math.pow(3,2);
System.out.println("元旦周长z="+z);
System.out.println("元旦面积s="+s);

}

}技术分享

原文:http://www.cnblogs.com/liuyanzeng/p/5860211.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!