# Array question

• 05-05-2011
Markusob
Array question
Code:

```consider the following: int [] numbers1 = {1,3,6,9}; int [] numbers1 = {2,4,6,8}; int result; int total; using a for statement write code that multiplies each element of numbers1 array by its corresponding element in numbers2 array and assigns the result to the result variable and accumilates each result in the total variable. Could someone explain and do this question plz!```
• 05-05-2011
bithub
Quote:

Originally Posted by Markusob
Could someone explain and do this question plz!

No, we will not do your homework for you.
• 05-05-2011
Markusob
Not homework my friend..

Im studying for an exam an need a little help for revision is all.
• 05-05-2011
itsme86
I'm not going to go as far as saying that I don't believe you, but... revision my ass. You're asking someone to explain and do something for you. Put forth some effort and ask questions about specific problems. Not "here's something that obviously looks like a homework problem that I'm too lazy to do."
• 05-06-2011
theoobe
If that is an exact copy and paste of the question then you need to slap your teacher for having both arrays named 'numbers1' in the code that has been prepared for you. No wonder you are struggling.

Code:

```int [] numbers1 = {1, 3, 6, 9}; int [] numbers2 = {2, 4, 6, 8}; int result; int total;```
Have a go at this problem, post your attempt, and we will help guide you to the correct answer.
• 05-06-2011
DanFraser
Can someone sort this guy out? This isn't exam level programming by any means, this was pop-quiz stuff at the end of a session at my university.

theoobe, I am more inclined to believe it's his typing rather than copy-paste.

OP, can you make a flowchart? Make a flowchart, realise exactly how easy this stuff is.
• 05-06-2011
Markusob
I just asked a simple question... its the type of stuff thats coming up on the exam so if you dont want to help just stop commenting!