fork download
  1. # include <stdio.h>
  2.  
  3. int myStrcmp(char s[], char t[])
  4. {
  5. int i;
  6. for(i=0; s[i]!='\0'; i++)
  7. {if(s[i]=='\0'){
  8. return 1;
  9. }
  10. }return 0;
  11.  
  12.  
  13. }
  14.  
  15. int main(){
  16. int ans;
  17. char s[100];
  18. char t[100];
  19. scanf("%s %s",s,t);
  20. ans = myStrcmp(s,t);
  21. printf("%s = %s -> %d\n",s,t,ans);
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0.01s 5288KB
stdin
abcd
abcd
stdout
abcd = abcd -> 0