I\'m declaring a 2d Array with 100 rows and columns. Im trying to get the user to dictate the numbers that go into the array. Im supposed to store the values without storing the
Well, first of all, you are dealing with a two dimensional array, so you will need two loops, one for the rows and the other for the colums.
for(int i=0; i<100; i++)
{
for(int j=0;j<100;j++)
{
nums[i][j] = scan.nextInt();
}
}
This syntax - int[scan.nextInt()][scan.nextInt()];
is not even legal.
You'll need to use nested for
loops for a 2-d array (one for rows and one for columns):
for (int i = 0; i < nums.length; ++i)
for (int j = 0; j < nums[i].length; ++j)
{
nums[i][j] = scan.nextInt();
}