//Program RandLoad - Copyright Constantine Roussos - 5-Apr-00 //Program will load an array with random numbers #include #include using namespace std; #include "time.h" long seedGen() { //seedGen function will generate a random number //seed that is more random than the clock. //Must include the time.h library header file srand(time(NULL)); //Use the clock to seed the RNG long newseed = rand(); //1st random number newseed = rand(); //2nd random number newseed = rand(); //3rd random number newseed = newseed*newseed; //square 3rd rand num //and use the result for the new seed //Use the new seed to get better random numbers return newseed; }//end seedGen template void RandLoad(T nmbrs[], int Kount, int maxRand) { //Must include the time.h library header file srand(seedGen()); //Seed the random # generator //Load the array with random numbers for (int i=0; i> Kount; cout << "What is maximum desired random number? "; cin >> maxRand; //Load the array with random numbers RandLoad(nmbrs, Kount, maxRand); //Display the contents of the array cout << "Display random numbers from the array" << endl; for (int i=0; i