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