Question: please answer this question The following program shows how you can use the STL vector for saving randomly generated digits and printing them. Convert the

The following program shows how you can use the STL vector for saving randomly generated digits and printing them. Convert the function ("print()") to a lambda expression. You must place the lambda expression inside of the "for_each( " function. In the following program, convert the for-loop to use two threaded functions. The summation of array indexes 0499 and 500 - 999 are managed in each separated threaded function. Do not use future \& promise or async (turning into zero scores). \#include using namespace std; int main() \{ srand(time(NuLL)); vector; for (auto \& iten: data) sum += item; cout "sum: " sum end1; return 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
