Question: Write a recursive c++ function that will take in 2 parameters (one int and a vector). The first parameter is a vector of integers and

Write a recursive c++ function that will take in 2 parameters (one int and a vector). The first parameter is a vector of integers and the second is an int. Your function should return the sum of all the even ints in the vector. Examples std::vector v = {1,54,23,71,27,56,4,9,11}; even_sum(v) // would return 114 Note yes I meant to call the function by only passing it one parameter.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!