feltins / ruby-06_retirement

Exercises from the Pragmatic Programmers book by Brian P. Hogan

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

##Exercise 6 - Retirement Calculator

Your computer knows what the current year is, which means you can incorporate that into your programs. You just have to figure out how your programming language can provide you with that information.

Create a program that determines how many years you have left until reirement and the year you can retire. It should prompt for your current age and the age you want to retire and display the output as shownin the example that follows.

###Example Output

What is your current age? 25
At what age would you like to retire? 65
You have 40 years left until you can retire.
It's 2015, so you can retire in 2055.

About

Exercises from the Pragmatic Programmers book by Brian P. Hogan


Languages

Language:Ruby 100.0%