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