Answered step by step
Verified Expert Solution
Link Copied!

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 JAVAimage text in transcribed

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; i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions