Created
January 11, 2011 21:24
-
-
Save mrandyclark/775178 to your computer and use it in GitHub Desktop.
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
# If you put in a beginning year and an end year, it should spit out a list of | |
# all of the leap years in between. | |
puts 'Hello. What year would you like to begin with?' | |
@start_year=gets.chomp | |
puts 'What year would you like to end with?' | |
@end_year=gets.chomp | |
input='' | |
while @start_year < @end_year | |
puts @start_year | |
puts @start_year%4 | |
if @start_year%4 == 0 | |
puts @start_year | |
@start_year++ | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment