Java while 제어문을 사용하여 1부터 10까지 출력

pitbull terrier·2021년 6월 24일
0

자바 알고리즘

목록 보기
12/27

문제

해결방안

package pack_While;

public class NumberPrint {

	public static void main(String[] args) {
		
		int i = 1;
		
		while (i<11) {
			
				
				System.out.print(i + " ");
			
			i++;
		}

	}

}

결과

profile
yoonbitnara.github.io

0개의 댓글