[프로그래머스 | C# | Lv.0] 홀짝 구분하기

728x90

https://school.programmers.co.kr/learn/courses/30/lessons/181944

📝 나의 풀이

using System;

public class Example
{
    public static void Main()
    {
        String[] s;

        Console.Clear();
        s = Console.ReadLine().Split(' ');
        int n = Int32.Parse(s[0]);
        
        if(n%2==0){
            Console.Write (n+" is even");
        } else {
            Console.Write (n+" is odd");            
        }

    }
}
728x90