본문 바로가기
프로그래머스 문제풀이

프로그래머스 Level 1 : 짝수와 홀수

by 공부합시다홍아 2020. 6. 29.

public class Solution {
    public string solution(int num) {
        string answer = "";
        if (num % 2 == 0)
            {
                answer = "Even";
            }
            else
                answer = "Odd";
        return answer;
    }
}

728x90