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