Array,random generated num...

my qns:declare and create an integer array of size 10. Then, the program should randomly, using a while loop, insert in numbers, in the range of 1 to 50, inclusive, into each slot of the array. The program should print the array values. Next, the program should randomly generate an integer, between 1 and 50, inclusive, to search for and also print it as output. Then, the program should replace all the numbers larger than the integer in the array with the value -1. If that integer does not appear in the array, then the program does not change any of the items in the array. At the end, the program should print the final array as output using a while loop.....

i got trouble doing anyone could help mi?
What part do you have problem with?
i just not very sure how to let the integer in the array to generate on its own, using a while loop
Topic archived. No new replies allowed.