Topic: Computers Maybe. Maybe not.

(link)

2: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;
}

back to main

<-
 Topic:    
->

Powered by Personal Weblog.

January 2018
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Dec   Feb

[RSS]

 


 


Dave Holland <dave@biff.org.uk>
$Id: index.php,v 1.75 2010-07-09 22:15:04 dave Exp $