This Java program:
- Takes an integer
xas input (size of the array). - Reads
xintegers into an array. - Prints all the entered integers.
- Calculates the average of the array values (formatted to 2 decimal places).
- Counts how many integers are less than the average and prints the result.
- Save the code in a file named
main.java. - Compile the program:
Input: 5 10 20 30 40 50
Output: 10 20 30 40 50 Average = 30.00 Count of numbers less than average = 2