[ create a new paste ] login | about

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

C, pasted on Oct 3:
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(void){
    int i;
    srand(time(NULL));
    for ( i = 0; i < 10; ++i )
        printf("%d\n", 2*(rand()%5+1));

    return 0;
}


Output:
1
2
3
4
5
6
7
8
9
10
10
4
6
10
6
6
6
10
8
10


Create a new paste based on this one


Comments: