donaricano-btn

CountBackwardsN


1. Question

1) You have a number N

2) Print out numbers backwards from N to 1


2. Solution

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import java.util.Scanner;
 
public class CountBackward {
     
    public static void main(String[]args){
         
        Scanner c = new Scanner(System.in);
         
        int a = c.nextInt();
         
        for(int i = a; i>0; i-- ){
            System.out.println(i);
        }
         
    }
 
}

https://github.com/KyleJeong/Algorithm
블로그 이미지

리딩리드

,