Assignment #24 Age in Five Years

Code

    /// Name: John Huh
    /// Period: 6
    /// Program Name: Age in Five Years
    /// File Name: AgeFiveYears.java
    /// Date Finished: 9/23/2015

        import java.util.Scanner;
    
        public class AgeFiveYears
        {
            public static void main( String[] args )
            {
                String name;
                int age, minus5, plus5;
            
                Scanner keyboard = new Scanner(System.in);
            
                System.out.print( "Hello.  What is your name? " );
                name = keyboard.next();
            
                System.out.println();
            
                System.out.print( "Hi, " + name + "!  How old are you? " );
                age = keyboard.nextInt();
            
                minus5 = age - 5;
                plus5 = age + 5;
            
                System.out.println();
                System.out.println( "Did you know that in five years you will be " + plus5 + " years old?" );
                System.out.println( "And five years ago you were " + minus5 + "! Imagine that!" );
            }
        }
    

Picture of the output

Assignment 1