[ create a new paste ] login | about

Link: http://codepad.org/w0YVwxK9    [ raw code | output | fork ]

C, pasted on Apr 9:
1
2
3
4
5
6
7
8
9
10
// simulation of Windows' rand()
int myrand() {
    return rand() & 0x7fff;
}

int main() {
    long long int num = myrand() ^ (myrand() << 15) ^ ((long long int) myrand() << 30);
    printf("%lld\n", num);
    return 0;
}


Output:
1
6710112765287


Create a new paste based on this one


Comments: