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. char cs=s[i];
  8. char ct=t[i];
  9.  
  10. if(cs>='a'&&cs<='z'){
  11. cs=cs-32;
  12. }
  13. if(ct>='a'&&ct<='z'){
  14. ct=ct-32;
  15. }
  16.  
  17. if(cs!=ct) return 0;
  18. }
  19. return 1;
  20. }
  21.  
  22. int main(){
  23. int ans;
  24. char s[100];
  25. char t[100];
  26. scanf("%s %s",s,t);
  27. printf("%s = %s -> ",s,t);
  28. ans = fuzzyStrcmp(s,t);
  29. printf("%d\n",ans);
  30. return 0;
  31. }
  32.  
Success #stdin #stdout 0.01s 5280KB
stdin
cdf rde
stdout
cdf = rde -> 0