Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN JAVA 2 Finding the average of all elements in a 2D array of integers. import java.util.* ; 5 6 7 public class Averager2D {
IN JAVA
2 Finding the average of all elements in a 2D array of integers. import java.util.* ; 5 6 7 public class Averager2D { public static void main(String[] args) //a 2D array intu a = {{5, 9, 3, 2, 14}, {77, 44, 22, 15, 99), (14, 2, 3, 9, 5), (98, 15, 17, 121, 33); System.out.printf("Average = %.2f ", average(a) ; Systen.out.println("EXPECTED!"); System.out.println("Average = 29.85"); System.out.printf("Average of evens = %.2f ", averageEvens(a)) ; System.out.println("EXPECTED:"); System.out.println("Average of evens = 26.57"); Randon randon new Random(1); a = new int(180) (1) ; for (int i = 0; iStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started