Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use java to print out sum of two dimensional array Please print out sum of each row and sum of each columns. Clearly indicate the

Use java to print out sum of two dimensional array
Please print out sum of each row and sum of each columns.
Clearly indicate the value of sum
The code blow is what I did, but my professor commented like this:
1. Its not clear what values are indicating sums
2. The innstructions were to find the sum for each row and each column. image text in transcribed
Twodimentional.java Downloads/Twodimentionaljava. 2 //write the pupose of program? 3 I am trying to print out sum of each rows and sum of each column 5public class Twodimentional f 6public static void main(String[) args) t ArraySort objArray new ArraySort); int [][] arr { 4,5,6 1,2,3 10 13 14 15 16 17 18 19class ArraySort f objArray.getcolumnSum(arr): 20 21 public void getcolumnSun(int arg) int I colsSum new int [31: 23 24 25 colsSum[11 ; colsSun12] 26 System.out.print In("The sum of arrays:") for( int i++) iarg.Length; for(int j jcarg[i].length; j++) 27 28 i-e; System.out.print(argilj" 31 else if(j-1) else 34 35 36 37 38 System.out.println() 41" for( int i-0; ?ccolsSun-length; i++){ System.out.print(colsSumtil" 45 46 47 F4 FS

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

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions