algorithm

더블릿|dovelet - 2번째 계단 - 분수 크기 비교/comparefrac

블루건 2016. 7. 22. 18:27

문제


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
 
using namespace std;
 
int main()
{
    float a, b, c, d;
    cin >> a >> b >> c >> d;
 
    if (a/> c/d)
        cout << "1";
    else if (a/< c/d)
        cout << "-1";
    else
        cout << "0";
 
    return 0;
}
cs