Write a program that reads from the console, a persons first name, current age, and a year
Fantastic news! We've Found the answer you've been seeking!
Question:
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.
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date: