Assignment 37; HowOldSpec

Code

    // Donovan Rich
    // Period 6
    // HowOldSpec
    // HowOldSpec.java
    // 10/16/2015
    
    import java.util.Scanner;
    
    public class HowOldSpec {
    
        public static void main( String [] args ) {
        
        Scanner keyboard = new Scanner(System.in);
            
        int age;
        
        System.out.print("How old are you?");
        age = keyboard.nextInt();
        
        if ( age < 16 )
        {
            System.out.println( "You are not old enough to do anything. Grow up, loser." );
        }
        else if ( age == 16 || age == 17 )
        {
            System.out.println( "You can drive, but you can't vote or rent a car." );
        }
        else if ( age < 27 )
        {
            System.out.println( "You can drive and vote, but you can't rent a car." );
        }
        else
        {
            System.out.println( "You can do anything. Douche." );
        }
      }
    }
        

Picture of the output

Assignment 37