3:45pm, Friday 25 June 2004
Someone at work was bemoaning the lack of /bin/maybe
. So I wrote it. GPL (though I don't believe this is the first implementation ever!)
#include <stdlib.h> #include <sys/types.h> #include <unistd.h> int main() { srand(getpid()); if(rand()<(RAND_MAX/2)) return 0; else return 1; }