Hi all...I'm a little stuck here. I have an assignment (summing all the numbers in a matrix) that I have figured out using the scanner and I need to figure out a way to turn it into a JOptionPane that "Echos the inputs as a[0] = xx, a[1] = xx, a[3] = xx, a[4] = xx, then displays the reslutl"

This is what I have figured out so far. Please check my logic as well as I'm very new to two-dimensional arrays.

In thinking about this some more I think I need to store each inputs index and recall that index at the end to "Echo the inputs as a[0] = xx, a[1] = xx, a[3] = xx, a[4] = xx, then displays the reslutl"

What do you think? I just need to echo the input at the end of the program, and I can't think of another way to do it.

March 15th, 2011, 10:15 AM

Java Neil

Re: Summing a 4X4 Matrix in JOptionPane

Quote:

Originally Posted by Java Neil

In thinking about this some more I think I need to store each inputs index and recall that index at the end to "Echo the inputs as a[0] = xx, a[1] = xx, a[3] = xx, a[4] = xx, then displays the reslutl"

What do you think? I just need to echo the input at the end of the program, and I can't think of another way to do it.

Well I've messed around with this for hours, and I'm pretty sure this is not how to do this...Once again, I need some help storing the user input and echoing this input at the same time as the sum of the matrix is given. Everything I have tried has either caused errors and would not compile, or has caused logical errors.