Write a program MaxAndMin
that creates an Array
of ten integers chosen randomly between -100 and +100 inclusive. Display the initial list of values. Then write a loop to run through the list of integers, looking for:
Sample output:
The array of random values:
95 -23 8 61 -12 95 79 4 -83 -75
Largest value 95 is at index 0
Smallest value -83 is at index 8