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] - 40 || s[i] - 40==t[i])) {
  6. return 0;
  7. }}
  8. return 1;
  9. }
  10.  
  11. int main(){
  12. int ans;
  13. char s[100];
  14. char t[100];
  15. scanf("%s %s",s,t);
  16. printf("%s = %s -> ",s,t);
  17. ans = fuzzyStrcmp(s,t);
  18. printf("%d\n",ans);
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 5276KB
stdin
AbCde AbCdE
stdout
AbCde = AbCdE -> 0