package 圓面積;
public class 圓面積 {
public static void main(String[] args) {
// TODO 自動生成的方法存根
final double PI = 3.1415926;
double r = 3.0,s,l;
l = 2 * PI * r;
s = PI * r * r;
System.out.println("半徑為3.0的圓的周長為:"+l+",面積為:"+s);
}
}
package 圓面積;
public class 圓面積 {
public static void main(String[] args) {
// TODO 自動生成的方法存根
final double PI = 3.1415926;
double r = 3.0,s,l;
l = 2 * PI * r;
s = PI * r * r;
System.out.println("半徑為3.0的圓的周長為:"+l+",面積為:"+s);
}
}
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。