fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5. string s; cin >> s;
  6. int a = 0,b = 0,c = 0;
  7. char ch;
  8. for(int i=0;i<s.size();i++){
  9. if(s[i] < '0' || s[i] >'9') break;
  10. ++c;
  11. a = a * 10 + (s[i] - '0');
  12. }
  13. int ps = c+1;
  14. ch = s[ps];
  15. cout << ch;
  16. c += 3;
  17. for(int i = c;i < s.size();i++) b = b * 10 + (s[i] - '0');
  18. //cout << a << ch << b << endl;
  19. //cout << a << " " << b;
  20. // if(ch == '<' && a < b) cout << "Right";
  21. // else if(ch == '=' && a == b) cout << "Right";
  22. // else if(ch == '>' && a > b) cout << "Right";
  23. // else cout << "Wrong";
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 5260KB
stdin
5 = 4
stdout
@