본문 바로가기

Algorithm

(C++) - 백준(BOJ) 1330번 : 두 수 비교하기

반응형

간단한 if 문이었습니다.

1
2
3
4
5
6
7
8
9
10
#include <iostream>
using namespace std;
int main() {
    int a, b;
    cin >> a >> b;
    if (a > b) { cout << ">"<<'\n'; }
    else if (a < b) { cout << "<"<<'\n'; }
    else
        cout << "=="<<'\n';
}
cs