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