Need Help ?

Home / Expert Answers / Other / Description Write a function called RandomArrayFill that inputs (i.e., takes a parameter) an intege

Description Write a function called RandomArrayFill that inputs (i.e., takes a parameter) an intege ...


Description Write a function called RandomArrayFill that inputs (i.e., takes a parameter) an integer array, and also that inputs (i.e., takes a parameter) an integer, which contains the size of the array. The function is then to write a random number, in the range [0, 100], to each element of the array. The function declaration of this function should look like so: void RandomArrayFill(int* array, int size); Now write a program that asks the user to input the size of an integer array. The program then needs to create an array of exactly this size. Next, the program must pass this created array to theRandomArrayFill function, so that a random number is assigned to each element of the array. After which, the program must output every array element to the console window. Your program output should look similar to this: Enter the size of an array to create: 6 Creating array and filling it with random numbers... Array = {57, 23, 34, 66, 2, 96} Press any key to continue After you finish implementing the above function, rewrite it again, but this time using std::vector. The function declaration of this new function should look like so: void RandomArrayFill(std::vector& vec);



Radioactive Tutors

Radio Active Tutors is a freelance academic writing assistance company. We provide our assistance to the numerous clients looking for a professional writing service.

NEED A CUSTOMIZE PAPER ON THE ABOVE DETAILS?
Order Now


OR

Get outline(Guide) for this assignment at only $10

Get Outline $10

**Outline takes 30 min - 2 hrs depending on the complexity and size of the task
Designed and developed by Brian Mubichi (mubix)
WhatsApp