while 문 실습

    문제 1 while 문의 조건에서 i를 이용해 1부터 10까지 출력해보세요. while 문 안에서 println을 이용해 출력하면 됩니다.

    public class WhileExam{
        public static void main(String[] args) {
    
        int i = 1;
        ______________________
        System.out.println(i);
        ______________________
        }
    }

     

    실행결과

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.