Expand|Select|Wrap|Line Numbers
- void RandArray (int mainArray[], int count)
- {/*RandArray */
- int minRange; // the minimum value the user decides for the array
- int maxRange; // the maximum values the suer decided for the array
- int randNum; // the random number generated
- // User sets MAX and MIN array values
- cout << "Minimum Value for the Array values: " ;
- cin >> minRange;
- cout << "Maximum Value for the Array values: " ;
- cin >> maxRange;
- randNum = (minRange + rand() % maxRange);
- // main loop to iterate numbers
- for (count = 0; count < ARRAY_SIZE; count++)
- {
- mainArray[count] =randNum;
- }
- }/* RandArray
the mainArray becomes {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11}
Help please!
Shellina