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