39. 홀짝 구분하기

김해준's avatar
Dec 08, 2025
39. 홀짝 구분하기

사용언어 : Java

문제
notion image
풀이
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"); } }
notion image
Share article