[프로그래머스] 짝수와 홀수

Zoo Da·2021년 9월 29일
0

프로그래머스

목록 보기
2/10
post-thumbnail

링크

https://programmers.co.kr/learn/courses/30/lessons/12937

sol1) 출력

#include <string>
#include <vector>

using namespace std;

string solution(int num) {
    string answer = "";
    answer = (num % 2==0 ? "Even" : "Odd");
    return answer;
}
profile
메모장 겸 블로그

0개의 댓글