Given a person’s year of birth, the Birthday Wizard can compute the year in which the person’s nth birthday will occur or has occurred. Write statements that can be used in a Java program to perform this computation for the Birthday Wizard.

What will be an ideal response?

```
System.out.println("Greetings.");

int year, age;

Scanner keyboard = new Scanner(System.in);
System.out.println("What year were you born in?");
year = keyboard.nextInt();
System.out.println("Choose an age in years.");
age = keyboard.nextInt();

System.out.println("You will turn " + age + " in the year ");
System.out.println(year + age);

```

Computer Science & Information Technology

You might also like to view...

When a chart is embedded in a PowerPoint slide using the ________ option, the chart in the presentation is updated when the Excel source data is updated

Fill in the blank(s) with correct word

Computer Science & Information Technology

Where does the computer store instructions and data that are used most often by the CPU?

A) Cache memory B) Read-only memory C) Hard drive D) Video RAM

Computer Science & Information Technology