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