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