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