Assignemnt #46 and Age.java

Code

    /// Name: Boris Kazantsev
    /// Period: 6
    /// Program Name: Age
    /// File Name: Age.java
    /// Date Finished: 1/5/2016
    
    import java.util.Scanner;
    
    public class Age{
        public static void main(String[] args){
            
            Scanner keyboard = new Scanner(System.in);
            
            String Q1, Q2, name;
            
            int age;
            
            System.out.print("age : ");
            age = keyboard.nextInt();
            
            if ( age < 16 ){
                System.out.println("You cant do anything");
            }
            
            if ( 15 < age && age < 18 ) {
                System.out.println("You can drive a car");
            }
            
            if ( 17 < age && age < 25 ) {
                System.out.println("You can vote but not rent a car");
            }
            
            if ( 25 <= age ) {
                System.out.println("You can do pretty much anything");
            }
        }
    }
                   
    

Picture of the output

Assignment 46