Write code to add all values together and to divide larger numbers by smaller numbers in odd/even elements.
For this project, you will write a Java program that demonstrates exception handling. Your program will accept from the user ten values and place those numbers in an array. The…