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