LJZN

每天更新Rails练习项目到Github~

» Home
» Category
» About Me
» Github

笨方法学Ruby第十一天

26 Jun 2016 » LRTHW
print "When were you born? "
born_year = gets.chomp.to_i
print "How tall are you? "
height = gets.chomp
print "How much do you weight? "
weight = gets.chomp

age = 2016 - born_year

puts "So, you're #{age} old, #{height} tall and #{weight} heavy."

Related Posts