Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def _Birthday
- puts ' Hello, today I will be telling you how old you are'
- puts 'please enter your year of birth.'
- year = gets.chomp
- puts 'Now the month you were born in please.'
- month = gets.chomp
- puts 'And finally the day you were born.'
- day = gets.chomp
- puts 'So you were born, ' + year + ' , ' + month + ' , ' + day + '?'
- answer = gets.chomp "(y/n)"
- if answer == 'y'
- puts 'Well then, you are'
- age = ' + year + ' ' + month + ' ' + day + '
- puts Time.local (age)
- else
- _Birthday
- end
- end
- _Birthday
Add Comment
Please, Sign In to add comment