if i have a set of nos like 4 6 8 76 and so on and another set of nos 2 45 34 and so on and i want to multiply 4*2 6*45 and so on and then add the result. how can i do it using a for loop
if i have a set of nos like 4 6 8 76 and so on and another set of nos 2 45 34 and so on and i want to multiply 4*2 6*45 and so on and then add the result. how can i do it using a for loop
That's quiet simple, just add the first set of numbers in first array and the second set of number in the second array and multiply the 2 arrays using single dimensional array (i.e single dimensional matrix) multiplication method. I hope you got my point.
Bookmarks