Alright. I am having a huge issue understanding arrays and why I would want to use them. I am in school and we have a project due that involves them. I have a set array , Array1(3,4)
Now that should give me 4 rows and 5 columns.... Right?
Now what I need to be able to do is to add all of the data in row1 and get the total for the entire array. This is what I am having a huge issue with.
Here are my values:
Array1(0, 0) = 5
Array1(0, 1) = 7
Array1(0, 2) = 3
Array1(0, 3) = 9
Array1(0, 4) = 12
Array1(1, 0) = 4
Array1(1, 1) = 8
Array1(1, 2) = 9
Array1(1, 3) = 13
Array1(1, 4) = 4
Array1(2, 0) = 0
Array1(2, 1) = -1
Array1(2, 2) = -7
Array1(2, 3) = 13
Array1(2, 4) = 8
Array1(3, 0) = 4
Array1(3, 1) = 4
Array1(3, 2) = 4
Array1(3, 3) = 4
Array1(3, 4) = 0
Do I need to setup different arrays or can I use the same array and just do the math?
Please note that I do not want the actual code to do this, I would never learn if anyone did that.. I just need to know what I am supposed to do to get the answers. If any of you can help.... I would really appreciate it.
Thanks,
Chuck
Now that should give me 4 rows and 5 columns.... Right?
Now what I need to be able to do is to add all of the data in row1 and get the total for the entire array. This is what I am having a huge issue with.
Here are my values:
Array1(0, 0) = 5
Array1(0, 1) = 7
Array1(0, 2) = 3
Array1(0, 3) = 9
Array1(0, 4) = 12
Array1(1, 0) = 4
Array1(1, 1) = 8
Array1(1, 2) = 9
Array1(1, 3) = 13
Array1(1, 4) = 4
Array1(2, 0) = 0
Array1(2, 1) = -1
Array1(2, 2) = -7
Array1(2, 3) = 13
Array1(2, 4) = 8
Array1(3, 0) = 4
Array1(3, 1) = 4
Array1(3, 2) = 4
Array1(3, 3) = 4
Array1(3, 4) = 0
Do I need to setup different arrays or can I use the same array and just do the math?
Please note that I do not want the actual code to do this, I would never learn if anyone did that.. I just need to know what I am supposed to do to get the answers. If any of you can help.... I would really appreciate it.
Thanks,
Chuck