[JAVA] 자바 제어문 : 반복문 (while)
·
JAVA
while 반복문 while(조건) { 실행문; //조건에 만족 하면 실행 될 문장 } int i = 1; // int 타입의 i 를 1 로 지정 while(i 100); // 점수가 0 보다 작거나 100보다 클때까지 // 이 말은 점수를 130 혹은 -24 입력하면 해당 조건이 ture 가 아니라 오류라서 실행 안함. if(score>=90) { //while문 조건에 충족을 하면 if 를 실행 할꺼다. System.out.println("A"); } else if (score>=80) { System.out.println("B"); } else if (score>=70) { System.out.println("c"); } else if (score>=60) { System.out.println("D..
해니01_15
'자바while' 태그의 글 목록