Question: Write a program that reads from the console, a persons first name, current age, and a year in the future and then displays the persons

Write a program that reads from the console, a person’s first name, current age, and a year in the future and then displays the person’s name and future age based on the future year. Your main will gather the input and then call a method displayFutureAge(name, currentage, futuredate) that will calculate the future age, based off of the year 2016, and then display the information. Use simple arithmetic to calculate the future age.

For example,

Enter name: Tom

Enter current age: 33

Enter future year: 2050

Output will be:

Tom will be 67 years old in the year 2050.

Step by Step Solution

3.38 Rating (167 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem we need to write a program that takes user input for a persons first name current age and a future year then calculates and disp... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!