// Illustration of how to initialize and use the builtin C random number // generator rand(). // // This version creates a "random" seed from the time of day and uses // this seed to initialize the random number generator. // // Alternatively you could type in a specific value for the seed, i.e. // // int seed; // seed = 3.14159; // srand(seed); // #include #include #include main() { int k, N; double x; srand(time(NULL)); // Seed the random number generator with a "random" seed N = 20; for(k=0; k