๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Algorithm ๐Ÿง‘๐Ÿป‍๐Ÿ’ป/๋ฐฑ์ค€(BOJ)

[๋ฐฑ์ค€,c++] 1330๋ฒˆ - ๋‘ ์ˆ˜ ๋น„๊ตํ•˜๊ธฐ

by dkswnkk 2021. 11. 4.
 

1330๋ฒˆ: ๋‘ ์ˆ˜ ๋น„๊ตํ•˜๊ธฐ

๋‘ ์ •์ˆ˜ A์™€ B๊ฐ€ ์ฃผ์–ด์กŒ์„ ๋•Œ, A์™€ B๋ฅผ ๋น„๊ตํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค.

www.acmicpc.net

#include <iostream>
using namespace std;

string compare(int n1, int n2) {
    if (n1 > n2)  return ">";
    else if (n1 < n2)  return "<";
    else  return "==";
}
int main() {
    int A, B;
    cin >> A >> B;

    cout<<compare(A, B);


}

๋Œ“๊ธ€