#include <string> #include <vector> using namespace std; string solution(int num) { if(num % 2 == 0) { return "Even"; } else { return "Odd"; } } | cs |
'Programmers > Level 1' 카테고리의 다른 글
[프로그래머스 1] 콜라츠 추측 (C/C++) (2) | 2019.10.19 |
---|---|
[프로그래머스 1] 최대공약수와 최소공배수 (C/C++) (0) | 2019.10.19 |
[프로그래머스 1] 제일 작은 수 제거하기 (C/C++) (0) | 2019.10.19 |
[프로그래머스 1] 정수 제곱근 (C/C++) (0) | 2019.10.19 |
[프로그래머스 1] 정수 내림차순으로 배치하기 (C/C++) (0) | 2019.10.18 |