inblog logo
|
moohyun
    알고리즘문제풀기

    숫자 비교하기

    화낼거양's avatar
    화낼거양
    Nov 14, 2024
    숫자 비교하기
    Contents
    문제정답
     
    school.programmers.co.kr
    school.programmers.co.kr

    school.programmers.co.kr

     

    문제

     
    notion image
     
    기본적으로 주어진 코드 :
    #include <stdio.h> #include <stdbool.h> #include <stdlib.h> int solution(int num1, int num2) { int answer = 0; return answer; }

    정답

     
    #include <stdio.h> #include <stdbool.h> #include <stdlib.h> int solution(int num1, int num2) { int answer = 0; if (num1 == num2) { answer = 1; } else { answer = -1; } return answer; }
    Share article
    Contents
    문제정답

    moohyun

    RSS·Powered by Inblog