Assignment #24 and Twenty-First Program

Code

        /// Name: Georgi Atanasov
        /// Period: 5
        /// Program Name: AgeinFiveYears
        /// File Name: AgeInFiveYears.java
        /// Date Finished: 10/9/2015
    
    import java.util.Scanner;

    public class AgeInFiveYears{
    
        public static void main(String[] args){
        
            String name;
            int age, age2, age3;
            
            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();
            
            age2 = age + 5;
            age3 = age - 5;
            
            System.out.println();
            System.out.println("Did you know that in five years you'll be " + age2 + " years old?");
            System.out.println("And five years ago you were " + age3 + "! Imagine that!");
        }
    }
    

Picture of the output

Assignment 24