fork download
  1. #include <stdio.h>
  2. #include <ctype.h>
  3.  
  4. int fuzzyStrcmp(char s[], char t[]){
  5. int i;
  6. for(i = 0; tolower(s[i]) == tolower(t[i]); i++){
  7. if(s[i] == '\0') return 1;
  8. }
  9. return 0;
  10. }
  11.  
  12. int main(){
  13. int ans;
  14. char s[100];
  15. char t[100];
  16. scanf("%s %s", s, t);
  17. ans = fuzzyStrcmp(s, t);
  18. printf("%s = %s -> %d\n", s, t, ans);
  19. return 0;
  20. }
Success #stdin #stdout 0s 5288KB
stdin
abC  Abc
stdout
abC = Abc -> 1