Question: a Problem 42 Write a function called adjust adds a random integer between -2 and 2 to each element of an array of integers. The

a Problem 42 Write a function called adjust adds a random integer between -2 and 2 to each element of an array of integers. The biggest allowed change to an entry of the array is 2 (either up or down) and the smallest allowed change is 0. Excessively long solutions that use more than 10 lines of code may lose points. Answer: int main() { int x[5] = {3,1,4,1,5}; adjust(x, 5); cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
