Помогите с кодом на С++

Приложения:

Ответы

Ответ дал: danulpopov
0
#include <bits/stdc++.h>

using namespace std;

int main()
{
    string s;
    cin >> s;
    string t;
    cin >> t;
    if (s[0] == '-' && t[0] == '-')swap(s,t);
    else if (s[0] == '-'){cout << 1; return 0;}
        else if (t[0]=='-'){cout << 2; return 0;}
    if (s.length() > t.length()){cout << 2; return 0;}
    if (s.length() < t.length()){cout << 1; return 0;}
    if (s > t){cout << 2; return 0;}
    if (s < t){cout << 1; return 0;}
}



Ответ дал: Z29
0
Уже не нужно
Ответ дал: danulpopov
0
ok
Вас заинтересует