inrprod0.cpp

inrprod0.cpp

#include ‹stl.h›

#include ‹iostream.h›

#include ‹string.h›

int vector1[5] = {1, 2, 3, 4, 5};

int vector2[5] = {1, 2, 3, 4, 5};

int main() {

 int result;

 result = inner_product(vector1, vector1 + 5, vector2, 0);

 cout ‹‹ "Inner product = " ‹‹ result ‹‹ endl;

 return 0;

}