3. Java (선택과 반복 (if, switch-case, while, for) )


3. Java (선택과 반복 (if, switch-case, while, for) )

1.If 문(If-else문) 사실 if-else문이라는 것은 없다 if문이 맞는 말이다. if문은 조건문의 결과가 참이라고 하면 그때 if문을 실행을 한다. else는 짝꿍(가장 가까운) if문의 조건식이 False일때 실행이 된다 public class ifTest { public static void main(String[] args) { // TODO Auto-generated method stub int score = 93; if(score =90) { // 조건을 만들어서 살행 System.out.println("A"); }else if(score >=80){ System.out.println("B"); }else if(score >=70) { System.out.println("C"); }e..


원문링크 : 3. Java (선택과 반복 (if, switch-case, while, for) )