Created
March 23, 2010 11:16
-
-
Save JonasNielsen/341067 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
puts 'Enter a starting year:' | |
startingyear= gets.chomp | |
puts 'Starting year is now ' + startingyear | |
puts 'Now enter an ending year' | |
endingyear = gets.chomp | |
puts 'Ending year is now ' + endingyear | |
startingyear.to_i.upto(endingyear.to_i) do |i| | |
if(i % 4 == 0 AND i % 100 != 0) | |
puts i | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment