본문 바로가기

알고리즘/Java

(JAVA) 백준 알고리즘 3단계 2742번 : 기찍N

for문

입력조건 하는 것을 계속 까먹ㄴ느다

 

 

소스

1
2
3
4
5
6
7
8
9
10
11
12
13
import java.util.Scanner;
public class Main{
    public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        
        if(a<=100000 || a>=1){
            for(int i=a; i>=1; i--){
                System.out.println(i);
            }
        }
    }
}
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter