2007-11-29 14:27:42 +00:00
|
|
|
/* -*- mode: C; c-basic-offset: 4 -*- */
|
2008-01-24 15:10:32 +00:00
|
|
|
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
|
2007-11-29 14:27:42 +00:00
|
|
|
|
2007-07-24 15:50:05 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
2013-04-16 23:58:56 -04:00
|
|
|
#include <toku_assert.h>
|
2007-07-24 15:50:05 +00:00
|
|
|
#include <errno.h>
|
|
|
|
|
|
|
|
long long parsell (char *s) {
|
|
|
|
char *end;
|
|
|
|
errno=0;
|
|
|
|
long long r = strtoll(s, &end, 10);
|
|
|
|
assert(*end==0 && end!=s && errno==0);
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
int main (int argc, char *argv[]) {
|
|
|
|
long long i;
|
2007-07-24 20:23:09 +00:00
|
|
|
assert(argc==4);
|
2007-07-24 15:50:05 +00:00
|
|
|
long long count=parsell(argv[1]);
|
|
|
|
long long range=100*parsell(argv[2]);
|
2007-07-24 20:23:09 +00:00
|
|
|
long long seed =parsell(argv[3]);
|
|
|
|
srandom(seed);
|
2007-07-24 15:50:05 +00:00
|
|
|
for (i=0; i<count; i++) {
|
2007-07-24 20:23:09 +00:00
|
|
|
printf("%lld\t%ld\n", (random()%range), random());
|
2007-07-24 15:50:05 +00:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|