Created
February 21, 2015 06:55
-
-
Save kevinbryantlou/32dcddb839a87dd66a65 to your computer and use it in GitHub Desktop.
Intro Java Course
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Ch1_PP4 | |
{ | |
public static void main(String[]args) | |
{ | |
int yob, age, endyear; | |
Scanner keyboard = new Scanner(System.in); | |
System.out.println("Enter what year you were born, and how many years to add"); | |
yob = keyboard.nextInt(); | |
age = keyboard.nextInt(); | |
endyear = yob + age; | |
System.out.println("In " + endyear + " you will be " + age + " years old"); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment