Product of two vectors you and V in C++
Dot product of two integer vectors you and V.using namespace std;
#include< stdio.h>
#include< stdlib.h>
#include < iostream>
#define length 5
int main()
{
int U[length]={1,2,3,4,5},V[length]={1.2.3.4.5};
int ps=0;
for(int i = 0 ; i < length ; i++){
ps += U[i]*V[i];
}
cost< < "dot product: "< < ps< < endl;
return 0;
}