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