id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

tmhscs@gmail.com arrays2d > array2D_average
prev  |  next  |  chance

Given a 2D array of integers (1D arrays to build a 2D array from) return the decimal average of all of the integers in the 2D array. Your first line of code must be:

int[][] arr = {row1, row2, row3};

array2D_average([1, 1], [-2, -2], [4, 7]) → 1.5
array2D_average([-1, 2, 3], [4, -5, 6], [16, 2, -9]) → 2.0
array2D_average([1], [2], [6]) → 3.0

...Save, Compile, Run (ctrl-enter)

public double array2D_average(int[] row1, int[] row2, int[] row3) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Post-solution available

Copyright Nick Parlante 2017 - privacy