Assignemnt #37 and SrslyHowOldRU.java

Code

    /// Name: Boris Kazantsev
    /// Period: 6
    /// Program Name: HowOld
    /// File Name: HowOld.java
    /// Date Finished: 11/21/2015
    
    import java.util.Scanner;
    
    public class HowOld{
        public static void main(String[] args){
            Scanner keyboard = new Scanner(System.in);
            
            String  name;
            int  age;
            
            System.out.print("What's your name?");
            name = keyboard.next();
            
            System.out.print("Ok, " + name + ", how old are you?");
            age = keyboard.nextInt();
            
            if ( age < 16 ){
                System.out.println("You can't drive!!!!!!");
            }
            else if ( 16 ==  age || 17 == age ) {
                System.out.println("You can drive but you can't vote!!");
            }
            else if (  age < 24 ) {
                System.out.println("You can vote but you can't rent a car!!!!!!");
            }
            else {
                System.out.println("You can do pretty much anything!!!");
            }
        }
    }
                   
    

Picture of the output

Assignment 37