Assignemnt #59

Code

///colin hinton
///5th period
///Card Monte
///CareMonte.java
///10/20/2015

import java.util.Scanner;
import java.util.Random;

class CardMonte
{
    public static void main (String [] args )
    {
        Scanner keyboard = new Scanner(System.in);
        
        int guess;
        
        System.out.println("WELCOM ALL TO COLIN'S GRAND GUESSING GAME");
        System.out.println("WE HAVE THREE DOORS THAT MY LOVLEY ASSISTANT WILL HIDE BEHIND");
        System.out.println("ALL YOU HAVE TO DO IS GUESS, YES GUESS WHICH DOOR SHE IS BEHIND");
        System.out.println();
        System.out.println("WHICH DOOR IS SHE BEHIND?");
        System.out.println();
        System.out.println();
        System.out.println( "## ## ##");
        System.out.println( "## ## ##");
        System.out.println( "1  2  3 ");
        
        guess = keyboard.nextInt();
        
        Random r = new Random();
        
        int x = (1 + r.nextInt(3));
        
        if (x == 1)
        {
            if (guess == x)
            {
                System.out.println("Correct");
                System.out.println( "gg ## ##");
                System.out.println( "gg ## ##");
                System.out.println( "1  2  3 ");
            }
            else 
            {
                System.out.println(" You are wrong she was in door one.");
                System.out.println( "gg ## ##");
                System.out.println( "gg ## ##");
                System.out.println( "1  2  3 ");
            }
        }
        else if ( x == 2)
        {
            if (guess == x)
            {
                System.out.println("Correct");
                System.out.println( "## gg ##");
                System.out.println( "## gg ##");
                System.out.println( "1  2  3 ");
            }
            else 
            {
                System.out.println(" You are wrong she was in door two.");
                System.out.println( "## gg ##");
                System.out.println( "## gg ##");
                System.out.println( "1  2  3 ");
            }
        }
        else if (x == 3)
        {
            if (guess == x)
            {
                System.out.println("Correct");
                System.out.println( "## ## gg");
                System.out.println( "## ## gg");
                System.out.println( "1  2  3 ");
            }
            else 
            {
                System.out.println("She was behind door three.");
                System.out.println( "## ## gg");
                System.out.println( "## ## gg");
                System.out.println( "1  2  3 ");
            }
        }
        else
        {
            System.out.println("You dunderheard");
        }
    }
}

    

Picture of the output

Assignment 1