
[프로그래머스,Level 1] 짝수와 홀수(JAVA 구현)
·
CodingTest/프로그래머스(Programmers)
- 첫 풀이 및 정답풀이 간단한 짝, 홀 구분 문제이다. class Solution { public String solution(int num) { String answer = ""; answer = num % 2 == 0 ? "Even" : "Odd"; return answer; } }