Assignment #24
Code
/// Gian Adoremos
/// Period: 7
/// Program Name: TwentyFourth Program
/// File Name: AgeInFiveYears.java
/// Date Finished: 10/2/2015
import java.util.Scanner;
public class AgeInFiveYears
{
public static void main (String[] args)
{
Scanner keyboard = new Scanner(System.in);
String name;
int age;
{
System.out.println();
System.out.print("What's your name, bro? ");
name = keyboard.next();
System.out.println();
System.out.print("Waddup, "+name+" What's your age bro? ");
age = keyboard.nextInt();
System.out.print("So, "+name+", Do you realize that you will be "+(age+5)+" in five years, bro? You were "+(age-5)+" five years ago, bro!");
}
}
}
Picture of the output