fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. string get_lower(string x) {
  5. int n = x.size();
  6. string r = "";
  7. for (int i = 0; i < n; i++) {
  8. r += tolower(x[i]);
  9. }
  10. return r;
  11. }
  12.  
  13. int main() {
  14. string a, b;
  15. cin >> a >> b;
  16.  
  17. a = get_lower(a);
  18. b = get_lower(b);
  19.  
  20. if (a == b) {
  21. cout << 0;
  22. } else if (a > b) {
  23. cout << 1;
  24. } else {
  25. cout << -1;
  26. }
  27. return 0;
  28. }
Success #stdin #stdout 0s 5688KB
stdin
Standard input is empty
stdout
Standard output is empty