fork(1) download
  1. # include <stdio.h>
  2.  
  3. int fuzzyStrcmp(char s[], char t[])
  4. {
  5. int i;
  6. while(s[i] != '\0')
  7. {
  8. if(s[i] != t[i])
  9. {
  10. return 0;
  11. break;
  12. }
  13. }
  14. return 1;
  15. //関数の中だけを書き換えてください
  16. //同じとき1を返す,異なるとき0を返す
  17. }
  18.  
  19. //メイン関数は書き換えなくてできます
  20. int main()
  21. {
  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 5320KB
stdin
abCD AbCd
stdout
abCD = AbCd -> 0