Question 1 (worth 0.5%):
Write a program that will compare the averages of two double arrays.
Both lists have the same length (4 elements)
The program prompt the user to enter the values of array1
the program will prompt the user to enter the values of array2
call the method
public static double Avg (double [] array)
passing to it array1 and storing avg1
then call it again and pass to it array2 and storing avg2
compare the two averages and print a message: "Avg of array 1 greater than or equal to array 2" or "Avg of
array 1 is less than array 2.
Question 2 (worth 0.5%):
Write a program that will ask the user to enter the size of an integer array. Then the program will prompt the
user to enter the values. The program will then use the array to find and print the sum and average.
Test your program on
Array size 6
Values: 2, 7, 4, 33, 21, 53