I have two arrays,
a = [3, 6, 8, 2, 5, 5]
b = [2, 7, 9]
and I need to create a new array c which takes the values and adds them like this: a[0+0]*b[0] + a[0+1]*b[1] + a[0+2]*b[2] = (3*2) + (6*7) + (9*8) = 6 + 42 + 72 which means c[0] = 120
I’m completely lost on how to do this anything to point me in the right direction would be awesome.
If
c[k] = a[k+0]*b[0] + a[k+1]*b[1] + a[k+2]*b[2]then