Fortune Cookie


 import java.util.Random;
    
    public class fun
    {
        
        public static void main( String[] args ) 
        {
            
            Random r = new Random();
            
            int fortune, n1, n2, n3, n4, n5, n6;
            
            fortune = 1 + r.nextInt(6);
            
            if ( fortune == 1 ) 
            {
                System.out.println( "You might win" );
            }
            else if ( fortune == 2 ) 
            {
                System.out.println( "You could drive" );    
            }
            else if ( fortune == 3 ) 
            {
                System.out.println( "You're not gonna win" ); 
            }
            else if ( fortune == 4 ) 
            {
                System.out.println( "You're gonna die" );    
            }
            else if ( fortune == 5 ) 
            {
                System.out.println( "I like cows" );    
            }
            else if ( fortune == 6 ) 
            {
                System.out.println( "This fortune cookie is expired" ); 
            }
            else 
            {
                System.out.println( "i aint got no type" );        
            }
            
            n1 = 1 + r.nextInt(14);
            n2 = 2 + r.nextInt(14);
            n3 = 3 + r.nextInt(14);
            n4 = 4 + r.nextInt(14);
            n5 = 5 + r.nextInt(14);
            n6 = 6 + r.nextInt(14);
            
            System.out.println( "\t" + n1 + " - " + n2 + " - " + n3 + " - " + n4 + " - " + n5 + " - " + n6 );
            
        }
    }
    

Picture of the output

Assignment 56