Arrays Program

Problem

Write a program in JAVA that allows the user to input 5 ints.  The program will then output these five values in reverse order.  The program will then output the values in order with a statement on how many of the other four  values are larger, smaller, or equal.

Example 1:

Input:
1
2
3
4
5

Output:
5
4
3
2
1
1 - 4 larger, 0 smaller, 0 equal
2 - 3 larger, 1 smaller, 0 equal
3 - 2 larger, 2 smaller, 0 equal
4 - 1 larger, 3 smaller, 0 equal
5 - 0 larger, 4 smaller, 0 equal

Example 2:

Input:
1
2
3
1
2

Output:
2
1
3
2
1
1 - 3 larger, 0 smaller, 1 equal
2 - 1 larger, 2 smaller, 1 equal
3 - 0 larger, 4 smaller, 0 equal
1 - 3 larger, 0 smaller, 1 equal
2 - 1 larger, 2 smaller, 1 equal