import java.util.Scanner;

/**
 * Asks the user for their age and then prints
 * what they can legally do.
 *
 * Demonstrates the use of ifs.
 *
 * @author Zach Tomaszewski
 */
public class LegalAge {

  public static void main(String[] args) {

    //get user's age
    Scanner keybd = new Scanner(System.in);
    System.out.print("Please enter your age: ");
    int age = keybd.nextInt();

    //print what they can do
    if (age < 16) {
      System.out.println("You are too young to legally enjoy" +
                         " adult pleasures.");
    }
    if (age >= 16) {
      System.out.println("You may drive.");
    }
    if (age >= 18) {
      System.out.println("You may smoke.");
      System.out.println("You may vote.");
    }
    if (age >= 21) {
      System.out.println("You may drink.");
    }
    if (age >= 65) {
      System.out.println("You may retire.");
    }

  }

}
