fork download
  1. #include <stdio.h>
  2.  
  3. int fuzzyStrcmp(char s[], char t[]){
  4. int i;
  5.  
  6. for (i = 0; s[i] != '\0' || t[i] != '\0'; i++) {
  7. char cs = s[i];
  8. char ct = t[i];
  9.  
  10. if ('A' <= cs && cs <= 'Z') cs = cs + ('a' - 'A');
  11. if ('A' <= ct && ct <= 'Z') ct = ct + ('a' - 'A');
  12.  
  13. if (cs != ct) return 0;
  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 5320KB
stdin
abci BAUj
stdout
abci = BAUj -> 0