fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. string s;
  7. string s1;
  8. cin>>s>>s1;
  9. for(int i=0;i<s.size();i++)
  10. {
  11. s[i]=tolower(s[i]);
  12.  
  13. }
  14. for(int i=0;i<s1.size();i++)
  15. {
  16. s1[i]=tolower(s1[i]);
  17.  
  18. }
  19. if(s==s1)
  20. {
  21. cout<<"0"<<endl;
  22. }
  23. else if(s>s1)
  24. {
  25. cout<<"1"<<endl;
  26. }
  27. else
  28. {
  29. cout<<"-1"<<endl;
  30. }
  31. return 0;
  32. }
Success #stdin #stdout 0.01s 5316KB
stdin
abcdefg
AbCdEfF
stdout
1