package lianxi;public class Yuan { public static void main(String[] args) { double r=3.0; double circle=2*r*Math.PI; double area=Math.PI*r*r; System.out.println("圆的周长为:"+circle); System.out.println("圆的面积为:"+area); }}
本文共 289 字,大约阅读时间需要 1 分钟。
package lianxi;public class Yuan { public static void main(String[] args) { double r=3.0; double circle=2*r*Math.PI; double area=Math.PI*r*r; System.out.println("圆的周长为:"+circle); System.out.println("圆的面积为:"+area); }}
转载于:https://www.cnblogs.com/ljxe/p/5523208.html