fork download
  1. # include <stdio.h>
  2.  
  3. int fuzzyStrcmp(char s[], char t[]){
  4. int i;
  5. for(i = 0; ; i++){
  6. char c1=s[i];
  7. char c2=t[i];
  8. if(c1>='A'&&c1<='Z')c1+=32;
  9. if(c2>='A'&&c2<='Z')c2+=32;
  10. if(c1!=c2)return 0;
  11. if(s[i]=='\0')return 1;
  12. }
  13. }
  14.  
  15. //メイン関数は書き換えなくてできます
  16. int main(){
  17. int ans;
  18. char s[100];
  19. char t[100];
  20. scanf("%s %s",s,t);
  21. printf("%s = %s -> ",s,t);
  22. ans = fuzzyStrcmp(s,t);
  23. printf("%d\n",ans);
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0s 5296KB
stdin
abCD AbCd
stdout
abCD = AbCd -> 1