/* mkrands.c
 * Richard Kay, Feb 2006
 * Generates random floats and puts these in rand.txt file
 * */

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

#define NRANDS 5000

int main(void){
	int i;
	FILE *out;
	out=fopen("rands.txt","w");
	/* initialise pseudo random generator */
	srand(time(NULL)); /* too predictable for cryptography */
	for(i=0;i<NRANDS;i++) /* print 10 random ints */
		fprintf(out,"%f\n",rand()/(float)RAND_MAX);	
	return 0;	
}

