(Solved):Write a Java code that read 10 integers from the use and store them in an array. Then, it finds the position (or index) of the maximum and minimum values in the array, and swap them (move the max e… View Answer…

 

Question

Write a Java code that read 10 integers from the use and store them in an array. Then, it finds the position (or index) of the maximum and minimum values in the array, and swap them (move the max element to the position of the min, and move the min element to the position of the max).

The output should be as follow:

 

EXPERT ANSWER

Solution:

  1. import
Scroll to top