조건문·5 / 22
if문
조건이 참일 때만 실행하려면 if를 씁니다.
int age = 20;
if (age >= 18) {
System.out.println("성인");
}할 일
score가 60 이상이면 "합격" 을 출력하세요
막혔나요?
코드 에디터
조건이 참일 때만 실행하려면 if를 씁니다.
int age = 20;
if (age >= 18) {
System.out.println("성인");
}score가 60 이상이면 "합격" 을 출력하세요