Exercise: Compute the Average

Compute the average of numbers present in std::vector<int>.

We'll cover the following

Challenge

Write a function that takes two arguments: an object of type std::vector<int> and an integer x. The function will return the average of even numbers greater than x.

Try to solve the question below. Feel free to view the solution in the next lesson after giving it a few shots. Good luck!

Get hands-on with 1200+ tech skills courses.