2070. 큰 놈, 작은 놈, 같은 놈

호찌 Hozzi ·2022년 5월 18일
0

알고리즘

목록 보기
14/18
#include<iostream>

using namespace std;

int main(int argc, char** argv)
{
	int test_case;
	cin>>test_case;

	for(int i = 1; i <= test_case; i++)
	{
        int a,b;
        a=0;
        b=0;
    	cin>> a>> b;
        
        if ( a < b ) {
            cout << "#"<< i << " " << "< " << endl;
        }
        
        else if ( a > b) {
            cout<< "#"<< i << " " << "> " << endl;
        }
        
         else if ( a == b ) {
            cout<< "#"<< i << " " << "=" << endl; 
         }
	}
	return 0;//정상종료시 반드시 0을 리턴해야합니다.
}

1) '='과 '=='는 다르다. 제대로 구별해서 쓸 것!
2) relax하면서 디버깅하기!

profile
코린이

0개의 댓글