Can't find this error in my program
<pre><code>import java.util.Scanner;
import java.util.Random;

public class SlotMachine
{
   public static void main(String []args)
   {
      Scanner input = new Scanner(System.in);
      Random randomGen = new Random();

      int start = 10;

      System.out.println("Welcome to the Slot machine!");
      System.out.println("You have "+ start);
      System.out.println("Choose one of the following menu options:");
      //==============================
      // MENU
      //==============================
      int menu = 2;

      while (menu &gt;= 1 &amp;&amp; menu &lt;= 2)
      {
         System.out.println("1) Play the slot machine.");
         System.out.println("2) Cash out.");
         menu = input.nextInt();

         if (menu == 1)
         {

            System.out.print("The slot machine shows: ");

            //================================================
            //GENERATE A RANDOM NUMBER BTWEEN 0-10 INCLUSIVE
            //================================================
            for(int i = 0; i &lt; 3; i++)
            {

               int randomNum = randomGen.nextInt(10);
               System.out.print(randomNum);
            }

            if (randomNum &lt; 100)
            {
               System.out.println("Sorry you don't win anything!!");
            }


            else if ( randomNum &gt;= 1 &amp;&amp; randomNum &lt; 1000)
            {

            }

            //===========================================
            // KEEPING COUNT OF  HOW MANY TIMES PLAYED
            // ==========================================
            int count = 0; // keeps count of how many times you play
            int amountLeft = 0;
            while (count &lt;= menu)
            {
               count += (menu*0.25);
               amountLeft = start - count;
            }

            System.out.println("You have" + amountLeft);

         }
         if (menu == 2)
         {
            System.out.println("Thank you for playing ");
         }

         if (menu &lt; 1 || menu &gt; 2)
         {
            System.out.println("invalid range of numbers....  PLEASE ENTER 1 OR 2!!!");
         }
         break;
      }
   }
}
</code></pre>

<p>I have an an error that says <code>randomNum cannot be resolved</code>.  I thought I declared this variable and initialized it.  Why is it keeping giving me errors?</p>

<p>The second part of my problem is how do I figure this?  This program is slot machine.  Here is a sample of the output:</p>

<pre><code>Welcome to the slot machine! 
You have $10.00.
Choose one of the following menu options:
1) Play the slot machine.
2) Cash out.

1

The slot machine shows 046. 
Sorry you don't win anything.

You have $9.75.
Choose one of the following menu options:
1) Play the slot machine.
2) Cash out.

1

The slot machine shows 933. 
You win 50 cents!

You have $10.00.
Choose one of the following menu options:
1) Play the slot machine.
2) Cash out.
</code></pre>

<p>How do I determine two numbers that are the same in the random generated number to determine if someone wins like 433 or 111 or 224?</p>
