آره تابع std::inner_product
#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
int main()
{
std::vector<int> a = { 1, 2, 3, 4 };
std::vector<int> b = { 4, 5, 6, 7 };
std::cout<<std::inner_product(a.begin(), a.end(), b.begin(),0/*natije zarbdakheli ba in add + mishe*/);
}