Created
August 24, 2012 07:10
-
-
Save rvbsanjose/3447000 to your computer and use it in GitHub Desktop.
Count Between
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def count_between(array, lower_bound, upper_count) | |
times = [] | |
until array.size == 0 | |
check_num = array.pop | |
if check_num.between?(lower_bound, upper_count) | |
times « check_num | |
end | |
end | |
times.length | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment