[백준/BAEKJOON] 2742번 찍기 N JAVA
1. 자연수 N을 입력받는다. 2. for 문을 돌면서 한 줄씩 자연수 N을 감소하며 출력한다. import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); sc.close(); for (int i = n; i > 0; --i) { System.out.println(i); } } }
코딩/BAEKJOON
2021. 9. 6. 22:38