PROGRAMMING AND CODE


Assignemnt #24

Code

/// Name: Justin Li
/// Period 7
/// Program Name: Age in Five Years
/// File Name: AgeInFiveYears.java
/// Date Finished: 10/2/15

import java.util.Scanner;

class AgeInFiveYears {
  
    public static void main(String[]args) {
      
        String name;
        int age, age5;
        
        Scanner keyboard = new Scanner(System.in);
        
        
        System.out.println("Hey, what is your name?:");
        name = keyboard.next();
        
        System.out.println("Oh Hi " + name + " how old are you?");
        age = keyboard.nextInt();
        age5 = age + 5;
        System.out.println("Did know that you will be " + age5 + " in five years? Wao");
        
        
        
          
          
    }
}
    

Picture of the output

Assignment 1