코딩하는 개굴이

BaekJoon/BOJ [JAVA] N찍기_2741 본문

알고리즘/Baekjoon

BaekJoon/BOJ [JAVA] N찍기_2741

개굴이모자 2018. 11. 16. 15:55
반응형

BaekJoon/BOJ [JAVA] N찍기_2741

HINT: for문을 써보자


import java.util.*;
public class baekjoon_2741 {
    public static void main(String[] argc){
        Scanner scanner = new Scanner(System.in);
        int num = Integer.parseInt(scanner.next());
        for(int i=1;i<=num;i++){
            System.out.println(i);
        }

    }
}

반응형

'알고리즘 > Baekjoon' 카테고리의 다른 글

BaekJoon/BOJ [JAVA] 별찍기 - 1_2438  (0) 2018.11.16
BaekJoon/BOJ [JAVA] 구구단_2739  (0) 2018.11.16
BaekJoon/BOJ [JAVA] 기직N_2742  (0) 2018.11.16
BaekJoon/BOJ [JAVA] 고양이_10171  (0) 2018.11.11
BaekJoon/BOJ [JAVA] 괄호_9012  (0) 2018.11.11
Comments