웅재의 코딩세상

[프로그래머스] 숫자 비교하기 본문

코딩테스트/프로그래머스 - LV 0

[프로그래머스] 숫자 비교하기

웅드 2024. 1. 1. 19:01
#include <string>
#include <vector>
#include <iostream>
using namespace std;

int solution(int num1, int num2) {
    int answer = 0;
    if(num1 == num2){
        answer =1;
    }
    else{
        answer = -1;
    }
    return answer;
}
반응형