Advertisement
Ritam_C

Codeforces 112A

Jan 29th, 2021
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5.     string s, t;
  6.     cin >> s >> t;
  7.     int a = 0;
  8.     for(int i = 0; i < s.length(); i++){
  9.         if((int)s[i] <= 90 && (int)s[i] >= 65){
  10.             s[i] = (char)((int)s[i]+32);
  11.         }
  12.  
  13.         if((int)t[i] <= 90 && (int)t[i] >= 65){
  14.             t[i] = (char)((int)t[i]+32);
  15.         }
  16.     }
  17.  
  18.     if(s == t){
  19.         cout << "0\n";
  20.     } else if(s < t){
  21.         cout << "-1\n";
  22.     } else{
  23.         cout << "1\n";
  24.     }
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement