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