title: How to start over with my code? C# Console
body: <p>I wanted to try how the <code>if</code> conditional works so I created this code almost by myself. I also had problems with random into int.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>using System;
  
  namespace Bigger_Smaller_Equal
  {
      class Program
      {
          static void Main(string[] args)
          {
              int min = 1;
              int max = 100;
  
              Random rnd = new Random();
              int gen = rnd.Next(min, max);
              Console.WriteLine("My Number is : " + gen + "!");
              Console.WriteLine("Tell me your number:");
              string typ = Console.ReadLine();
              int num = int.Parse(typ);
              if (num == gen)
              {
                  Console.WriteLine(num + " is Equal to " + gen);
  
              }
              else if (num &gt; gen)
              {
                  Console.WriteLine(num + " Is Bigger than " + gen);
              }
              else if (num &lt; gen)
              {
                  Console.WriteLine(num + " Is Smaller than " + gen);
              }
              Console.WriteLine("Press Any Key to exit.");
              Console.ReadLine();
          }
      }
  }
  </code></pre>
  
  <p>How to make the console stop, so it will allow me to enter another number?</p>
  
  <p>Basically:</p>
  
  <ol>
  <li>I write a number it tells me if its smaller bigger or equal to number which was randomly generated</li>
  <li>After I press enter instead of closing the console the number will be generated again and I can write new number and so on.</li>
  </ol>