1. 程式人生 > >1.8

1.8

style hang ble port lin div main pub color

刪除 2017-09-11 10:41

public class Yuan{
public static void main(String[] args){
double r;
double area;
double zhouchang;
r = 5.5;
area = r * r * 3.14159;
zhouchang = r * 3.14159 * 2;
System.out.println("半徑為" + r + "圓的面積為" + area);
System.out.println("半徑為" + r + "圓的周長為" + zhouchang);
}
}

1.8