I have to design a recursive (not iterative)function that allows me to calculate a scalar product of two vectors ofndimensions.Example:returns 14.25.Code:dot_product ({1.5.2.7.3.0}, {3.0,2.5,1.0}, 3)

variables

Any idea of how to do it?Code:a : vector [MAX] of real, b : vector [MAX] of real, n: integer real Returns a real.

I'm just starting with C.

Thanks,