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