about | help | code help+videos | done | prefs |
array2D_sumCorners
Given a 2D array of integers (1D arrays to build a 2D array from), return the sum of all of the values in the corners of the array. Note: The 2D array will have at least 2 rows and 2 columns. Your first line of code must be: int[][] arr = {row1, row2, row3}; array2D_sumCorners([1, 1], [-2, -2], [3, 3]) → 8 array2D_sumCorners([-1, 2, 3], [4, -5, 6], [16, 2, -9]) → 9 array2D_sumCorners([1, -2, 3, -4], [-5, 6, -7, 8], [9, -10, -11, 12]) → 18 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy