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