import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter the birth year");
int birth = in.nextInt();
System.out.println("Enter the current year:");
int current = in.nextInt();
System.out.println("The age is: " + (current - birth));
}
}
Comments
Leave a comment