# Assignemnt #59, Three Card Monte

## Code

```      /// Name: Alex Pinder
/// Period: 5
/// Program Name: Three Card Monte
/// File Name: prog59.java
/// Date Complete: 1/5/16

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

public class prog59
{
public static void main( String[] args )
{
Random r = new Random();

Scanner keyboard = new Scanner(System.in);

System.out.println( "You slide up to Fast Eddie's card table and plop down your cash.\nHe glances at you out of the cornder of his eye and starts shuffling.\nHe lays down three cards.\n\nWhich one is the ace?\n\n\t\t##\t##\t##\n\t\t##\t##\t##\n\t\t1 \t2 \t3\n" );
guess = keyboard.nextInt();

if ( answer == 1 )
{
if ( answer == guess )
{
System.out.println( "Ha! Fast Eddie wins again! The ace was card number 1.\n\n\t\tAA\t##\t##\n\t\tAA\t##\t##\n\t\t1 \t2 \t3" );
}

else if ( guess != answer && guess >= 1 && guess <= 3 )
{
System.out.println( "You Nailed it! Fast Eddie reluctantly hands over your winnings, scowling.\n\n\t\tAA\t##\t##\n\t\tAA\t##\t##\n\t\t1 \t2 \t3" );
}
else
{
System.out.println( "Next time try to guess something that is actually there!" );
}
}

else if ( answer == 2 )
{
if ( answer == guess )
{
System.out.println( "Ha! Fast Eddie wins again! The ace was card number 2.\n\n\t\t##\tAA\t##\n\t\t##\tAA\t##\n\t\t1 \t2 \t3" );
}

else if ( guess != answer && guess >= 1 && guess <= 3 )
{
System.out.println( "You Nailed it! Fast Eddie reluctantly hands over your winnings, scowling.\n\n\t\t##\tAA\t##\n\t\t##\tAA\t##\n\t\t1 \t2 \t3" );
}
else
{
System.out.println( "Next time try to guess something that is actually there!" );
}
}

else if ( answer == 3 )
{
if ( answer == guess )
{
System.out.println( "Ha! Fast Eddie wins again! The ace was card number 3.\n\n\t\t##\t##\tAA\n\t\t##\t##\tAA\n\t\t1 \t2 \t3" );
}

else if ( guess != answer && guess >= 1 && guess <= 3 )
{
System.out.println( "You Nailed it! Fast Eddie reluctantly hands over your winnings, scowling.\n\n\t\t##\t##\tAA\n\t\t##\t##\tAA\n\t\t1 \t2 \t3" );
}
else
{
System.out.println( "Next time try to guess something that is actually there!" );
}
}
}
}
```