Need help with a java program assignment for school. Here is the problem:
We are all looking forward to retiring someday. Assuming we will retire on our 65th birthday, write a Java program that prompts the user for his/her birthday month, day, and year and then prints out the date the user will retire.
I am having trouble calculating when the user will turn 65. Here is what I have so far:
package com.mime.project1; import java.util.Scanner; public class Assign2 { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int month, day, year; System.out.print("Enter the month you were born: "); month = stdIn.nextInt(); System.out.print("Enter the day you were born: "); day = stdIn.nextInt(); System.out.print("Enter the year you were born: "); year = stdIn.nextInt(); } }