Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can do it even even faster by replacing your if statements (works because the ascii values end in the digit they represent):

    if (d & 1)
       printf("odd\n");
    else 
       printf("even\n")




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: