fork download
  1. # include <stdio.h>
  2.  
  3. int fuzzyStrcmp(char s[], char t[]){
  4.  
  5.  
  6. int i;
  7. char cs, ct;
  8. for(i=0; ; i++){
  9. cs=s[i];
  10. ct=t[i];
  11. if(cs>='a'&&cs<='z')cs=cs-32;
  12. if(ct>='a'&&ct<='z')ct=ct-32;
  13. if(cs!=ct)return 0;
  14. if(cs=='\0')return 1;
  15. }
  16. return 0;
  17.  
  18.  
  19. }
  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 0s 5320KB
stdin
abCD AbCd
stdout
abCD = AbCd -> 1