Compute the sum of all elements in the vector of length .
Input
a- input vector of lengthn.n- the number of elements ina.
Output
s- the sum of all elements ofa.
Compute the sum of all elements in the vector of length .
a - input vector of length n.n - the number of elements in a.s - the sum of all elements of a.Practice problem · every submission below is public, click to view code