next up previous
Next: Recursion Up: Assignment 10: Arrays Previous: Random integers

for loops

1.
Using a for loop, write a method called inRange that counts the number of elements in an integer array that fall in a given range (from lowVal to highVal, including both ends).



Allen Downey
1999-11-09