For 1D Array , solution would be like this :
Suppose two arrays are A & B of equal size n
int result = 0;
for(int i = 0; i < n; i++)
{
result = result + A[i]*B[i];
}
For 1D Array , solution would be like this :
Suppose two arrays are A & B of equal size n
int result = 0;
for(int i = 0; i < n; i++)
{
result = result + A[i]*B[i];
}