artifacts.log

Home

❯

programming

❯

Algorithms

❯

프로그래머스_짝수와 홀수

프로그래머스_짝수와 홀수

2026년 11월 07일1 min read

  • 알고리즘
  • 코딩-테스트
  • 프로그래머스
class Solution {
    public String solution(int num) {
        String answer = "";
        int result = num % 2;
        if(result == 0){
            answer = "Even";
        }
        else{
            answer = "Odd";
        }
        
        return answer;
    }
}

https://school.programmers.co.kr/learn/challenges


Created with Quartz v4.5.2 © 2026

  • GitHub