title: Program to find prime numbers
body: <p>I want to find the prime number between 0 and a long variable but I am not able to get any output.</p>
  
  <p>The program is </p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  namespace ConsoleApplication16
  {
      class Program
      {
          void prime_num(long num)
          {
              bool isPrime = true;
              for (int i = 0; i &lt;= num; i++)
              {
                  for (int j = 2; j &lt;= num; j++)
                  {
                      if (i != j &amp;&amp; i % j == 0)
                      {
                          isPrime = false;
                          break;
                      }
                  }
                  if (isPrime)
                  {
                      Console.WriteLine ( "Prime:" + i );
                  }
                  isPrime = true;
              }
          }
  
          static void Main(string[] args)
          {
              Program p = new Program();
              p.prime_num (999999999999999L);
              Console.ReadLine();
          }
      }
  }
  </code></pre>
  
  <p>Can any one help me out and find what is the possible error in the program?</p>