#include <iostream.h>
#include <stl.h>

int input1 [4] = { 1, 6, 11, 8 };
int input2 [4] = { 1, 5, 2, 3 };

int main ()
{
  int total = 
    inner_product (input1, input1 + 4, input2, 0, plus<int> (), times <int> ());
  cout << "total = " << total << endl;
  return 0;
}
ÿ