logo CodeStepByStep logo

CountInRange

Language/Type: VB List collections

Write a function named CountInRange that accepts three parameters: a List of integers, a minimum and maximum integer, and returns the number of elements in the list within that range inclusive. For example, if the list v contains {28, 1, 17, 4, 41, 9, 59, 8, 31, 30, 25}, the call of CountInRange(v, 10, 30) should return 4. If the list is empty, return 0. Do not modify the list that is passed in.

Function: Write a VB function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.