Assignemnt #56

Code

/// Name: Sam Menar
/// Period: 6
/// Program Name: FortuneCookie
/// File Name: FortuneCookie.java
/// Date Finished: 11/30/15

import java.util.Random;

public class FortuneCookie
{
    public static void main ( String[] args )
    {
        Random r = new Random();
        int random = 1 + r.nextInt(6);
        int n1 = 1 + r.nextInt(54);
        int n2 = 1 + r.nextInt(54);
        int n3 = 1 + r.nextInt(54);
        int n4 = 1 + r.nextInt(54);
        int n5 = 1 + r.nextInt(54);
        int n6 = 1 + r.nextInt(54);
        
        System.out.print( "Fortune cookie says: " );
        
        if ( random == 1 )
        {
            System.out.println("You will only be ugly forever");
        }
        else if ( random == 2 )
        {
            System.out.println("You will be alone forever you worthless sack of scum");
        }
        else if ( random == 3 )
        {
            System.out.println("You should probably end your pathetic life");
        }
        else if ( random == 4 )
        {
            System.out.println("You're going to gain a lot of weight... ew");
        }
        else if ( random == 5 )
        {
            System.out.println("You will be very happy today");
        }
        else 
        {
            System.out.println("You will be blessed to hear that J Cole and Kedrick Lamar are dropping a collab mixtape");
        }
        
        System.out.println( n1 + " - " + n2 + " - " + n3 + " - " + n4 + " - " + n5 + " - " + n6);
    }
}
        
        

                       
    

Picture of the output

Assignment 49