times.cpp

We use cookies. Read the Privacy and Cookie Policy

times.cpp

#include ‹iostream.h›

#include ‹stl.h›

int input[4] = {1, 5, 7, 2};

int main() {

 int total = accumulate(input, input + 4, 1, times‹int›());

 cout ‹‹ "total = " ‹‹ total ‹‹ endl;

 return 0;

}