fork download
  1. #include <stdio.h>
  2.  
  3. int fuzzyStrcmp(char s[], char t[]){
  4. int i = 0;
  5. while(s[i] != '\0' || t[i] != '\0'){
  6. char cs = s[i];
  7. char ct = t[i];
  8.  
  9. if(cs >= 'A' && cs <= 'Z') cs = cs + ('a' - 'A');
  10. if(ct >= 'A' && ct <= 'Z') ct = ct + ('a' - 'A');
  11. if(cs != ct) return 0;
  12. i++;
  13. }
  14.  
  15. return 1;
  16. }
  17.  
  18. int main(){
  19. int ans;
  20. char s[100];
  21. char t[100];
  22. scanf("%s %s", s, t);
  23. printf("%s = %s -> ", s, t);
  24. ans = fuzzyStrcmp(s, t);
  25. printf("%d\n", ans);
  26. return 0;
  27. }
  28.  
Success #stdin #stdout 0s 5284KB
stdin
abCD AbCd
stdout
abCD = AbCd -> 1