Question: PLEASE QUCK Write a Java program that separately finds the average of even and odd numbers in a one-dimensional array a[] of int values and

PLEASE QUCK

PLEASE QUCK Write a Java program that separately finds the average of

Write a Java program that separately finds the average of even and odd numbers in a one-dimensional array a[] of int values and print it as shown below. Your code should work for arrays of arbitrary size. The capacity of the array will be decided by the user and the array will be populated by the user again. Sample run: \begin{tabular}{l} Enter the size of an array: \\ 5 \\ Enter the element 1 of the array: 32 \\ Enter the element 2 of the array:11 \\ Enter the element 3 of the array: 25 \\ Enter the element 4 of the array:14 \\ Enter the element 5 of the array:15 \\ The average of even numbers is:23.0 \\ The average of odd numbers is:17.0 \\ \hline \end{tabular} Sample run: Enter the size of an array: 4 Enter the element 1 of the array:3 Enter the element 2 of the array:7 Enter the element 3 of the array:1 Enter the element 4 of the array: 9 The average of even numbers is:0.0 The average of odd numbers is: 5.0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!