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