The naive way would be to linearly iterate the range and multiply with each number in the range.
Example: Array: {1,2,3,4,5,6,7,8,9,10}; Multiply index 3 to index 8 wit
You can follow a linear approach and code it in C++11 like
C++11
std::array nums = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; std::for_each(nums.begin() + 2, nums.begin() + 8, [](int & n) { n *= 2; }); for (int & n : nums) std::cout << n << " ";
Output
1 2 6 8 10 12 14 16 9 10