- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
#include <numeric>
#include <algorithm>
#include <iostream>
#include <functional>
#include <boost/iterator/counting_iterator.hpp>
int main()
{
std::cout << std::accumulate(boost::make_counting_iterator(2), boost::make_counting_iterator(8), 1, std::multiplies<int>());
return 0;
}
А что, функциональный стиль вычисления факториала 8 :)
Нам нравится.