Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print "Iveskite metus: "
- metai=gets.to_i
- print "Iveskite menesi: "
- menuo=gets.chomp
- case menuo
- when '1'
- puts "31d."
- when '2'
- if(metai % 400 == 0 || (metai % 100 != 0 && metai % 4 == 0))
- puts "29d."
- else
- puts "28d."
- end
- when '3'
- puts "31d."
- when '4'
- puts "30d."
- when '5'
- puts "31d."
- when '6'
- puts "30d."
- when '7'
- puts "31d."
- when '8'
- puts "31d."
- when '9'
- puts "30d."
- when '10'
- puts "31d."
- when '11'
- puts "30d."
- when '12'
- puts "31d."
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement