[ create a new paste ] login | about

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

C, pasted on Nov 16:
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdio.h>
#include <stdlib.h>
#define N 100
int main() {
  int i, rnd;
  for (i = 0; i < N; i++) {
    rnd = (int)((double)rand() / ((double)RAND_MAX + 1) * 2);
    printf("%d", rnd);
  }
  return 0;
}
/* end */


Output:
1
1011100101010111110100010000101110110101110100110110011000000111010111100111011010011001011111010111


Create a new paste based on this one


Comments: