fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. string s;
  6. string s0;
  7. cin>>s>>s0;
  8. for(int i=0;i<s.length();i++){
  9. s[i]=tolower(s[i]);
  10. }
  11. for(int j=0;j<s0.length();j++){
  12. s0[j]=tolower(s0[j]);
  13. }
  14. int c=s.compare(s0);
  15. if(c==0){
  16. cout<<0<<"\n";
  17. }
  18. else if(c>0){
  19. cout<<1<<"\n";
  20. }
  21. else cout<<-1<<"\n";
  22. return 0;
  23. }
Success #stdin #stdout 0.01s 5472KB
stdin
abcdefg
AbCdEfF


stdout
1