fork(1) download
  1. # include <stdio.h>
  2.  
  3. int fuzzyStrcmp(char s[], char t[]){
  4. //関数の中だけを書き換えてください
  5. int i;
  6. for(i=0; s[i]==t[i];i++){
  7. if(s[i]=='\0')
  8. return 1;
  9. }
  10. return 0;
  11. //同じとき1を返す,異なるとき0を返す
  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. }
  25.  
Success #stdin #stdout 0s 5280KB
stdin
abCD AbCd
stdout
abCD = AbCd -> 0