Advertisement
momo2345

Petya and String

Jul 23rd, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     string s1,s2;
  6.     cin>>s1>>s2;
  7.     std:: for_each(s1.begin(),s1.end(),[] (char &c){
  8.              c= :: tolower(c);
  9.              });
  10.    std:: for_each(s2.begin(),s2.end(),[] (char &c){
  11.              c= :: tolower(c);
  12.              });
  13.    
  14.     if(s1>s2) puts("1");
  15.     if(s1<s2) puts("-1");
  16.     if(s1==s2)puts("0");
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement