Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //PostCondition:Array i sfilled with random numbers
- void fillRandom(Array<int> & data, int range=100)
- {
- for (int i=0; i < data.length(); i++)
- data[i] = rand() % range;
- }
- int main() {
- // code goes here
- Array<int> a1(20);
- fillRandom(a1);
- for (int i=0; i < a1.length(); i++)
- cout << a1[i] << endl;
- // ---------------------------------------------------
- cout << endl << "Press enter to quit";
- cin.get();
- return 0;
- }
Add Comment
Please, Sign In to add comment