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