fork download
  1. # include <stdio.h>
  2.  
  3. int fuzzyStrcmp(char s[], char t[]){
  4. for(int i=0;s[i]!='\0';i++){
  5. if(s[i]-t[i]==32||t[i]-s[i]==32){
  6. return 1;
  7. }
  8. if(s[i]==t[i]){
  9. return 1;
  10. }
  11. }
  12. return 0;
  13. }
  14.  
  15.  
  16. int main(){
  17. int ans;
  18. char s[100];
  19. char t[100];
  20. scanf("%s %s",s,t);
  21. printf("%s = %s -> ",s,t);
  22. ans = fuzzyStrcmp(s,t);
  23. printf("%d\n",ans);
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0s 5320KB
stdin
abcd
abcc
stdout
abcd = abcc -> 1