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