728x90
반응형
package ch01_variable_operator;
public class MyBox {
public static void main(String[] args) {
double width ;
double height ;
double area ;
double perimeter ;
width = 10.0 ;
height = 5.0 ;
area = width * height ;
perimeter = 2 * (width+height) ;
System.out.println("사각형 넓이 :" +area);
System.out.println("사각형 둘레 :" +perimeter);
}
}
728x90
반응형
'Java' 카테고리의 다른 글
| <Git> Increment01.java (0) | 2023.02.04 |
|---|---|
| <Git>MyPrint.java (0) | 2023.02.04 |
| <Git>LogicalOperator.java (0) | 2023.02.04 |
| <Git> ErrorDebug.java (0) | 2023.02.02 |
| <Git> Condition02.java (0) | 2023.02.02 |