I have an assignment that requires me to add together 2 small 2-D arrays making a 3rd array. I understand how to work with 1 2-D array but don't know how to add 2 arrays together. Any tips, web sites or etc. WOULD BE GREATLY APPRECIATED!
You'll need 2 loops, for loops would be ideal, and 2 counters that keep track of the outer and inner indices as you iterate through the loops. The only calculations you will do will occur in the innermost loop.
I could just give you the code, but since this is a homework assignment I'm sure you wouldn't want us to deprive you of the learning experience. For more help, please submit your best attempt (the code).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.