Prog46: Age Message 3
///Name: Ilana Levy
///Period: 5
///Program Name: Age Message 3
///File Name: ageMessage3.java
///Date Finished: 10/5/2015
import java.util.Scanner;
public class ageMessage3
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner( System.in );
String name;
int age;
System.out.print( "Your name: " );
name = keyboard.next();
System.out.print( "Your age: " );
age = keyboard.nextInt();
if ( age < 16 )
System.out.println( "You can't drive, " + name );
else if ( age <= 17 && age >= 16 )
System.out.println( "You can drive but not vote, " + name );
else if ( 18 <= age && age <= 24 )
System.out.println( "You can vote but not rent a car, " + name );
else if ( 25 <= age )
System.out.println( " You can do pretty much anything, " + name);
}
}