Assignemnt #34

Code

/// Name: Ryan Volko
/// Period: 7  
/// Program Name: HowO ld Are You Program
/// File Name: HowOldAreYou.java
/// Date Finished: 10/8/2015

  import java.util.Scanner;
  
  public class HowOldAreYou
  {
      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 can't drive." );
         }
         
         if ( age < 18 )
         {
             System.out.println( "You can't vote." );
         }
         
         if ( age < 25 )
         {
             System.out.println( "You can't rent a car." );
         }
         
          if ( age > 25 )
         {
             System.out.println( "You can do everything legal." );
         }
          
           if ( age < 25 )
         {
             System.out.println( "You can't do anything fun except drive." );
         }
             
     }
 }
    

Picture of the output

Assignment 34