Writing a program in C++ and I need help [migrated]
- by compscinoob
So I am a new to this. I am trying to write a program with a function
double_product(vector< double a, vector< double b) that computes the scalar product of two vectors. The scalar product is
$a_{0}b_{0}+a_{1}b_{1}+...a_{n-1}b_{n-1}$.
Here is what I have. It is a mess, but I am trying!
#include<iostream>
#include<vector>
…