Jan 13, 2025
10:35:30pm
kapcreations All-American
I’d probably respond with this
Using the following function, write a function that returns a 0 or a 1 with equal probability.

int random() {
return ((rand() % 5) + 1);
}


int random01() {
return ((([]{ for (;;) if (int r = random(); r - 5 && r) return r; })() % 2) << 1) >> 1;
}

Just to see you squirm a bit.
kapcreations
Bio page
kapcreations
Joined
Aug 17, 2010
Last login
Jan 15, 2025
Total posts
5,016 (19 FO)
Messages
Author
Time
Jan 13, 10:03pm
Jan 13, 10:03pm

Posting on CougarBoard

In order to post, you will need to either sign up or log in.