본문으로 바로가기
728x90
반응형

문제

 

 

 

728x90

 


풀이

 

 

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
import java.util.Scanner;
 
public class Solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        if (n%2 == 0) {
            System.out.println(n + " is even");
        } else {
            System.out.println(n + " is odd");
        }
    }
}
 
cs

 


반응형

 

728x90
반응형