user
info

cool.c

I'm guessing I wrote this after learning how simple pseudo-random number generators work. This defines a super simple PRNG and uses it to print out a continous stream of pseudo-random digits. Last modified Feb 5, 1999.

#include <stdio.h> #include <time.h> int main(){ struct timespec blah, blah2; int x; blah.tv_sec = 0; blah.tv_nsec = 19999999; x = 3; while (1) { x = (( x * 37267 ) + 38117) % 24457 ; printf("%d",x%10); fflush(stdout); nanosleep(&blah,NULL); } }