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