title: Print the prime numbers from 0 to 10,000
body: <p>Im currently trying to create a program that prints the prime numbers from 0 to 10,000 using only for,do while and ifs. I created this program but it doesn't runs</p>
  
  <pre><code>static void Main(string[] args)
      { 
          for (int x = 2; x &lt; 10000; x++)
          { 
              for (int y = 1; y &lt; x; y++)
              { 
                  if (x % y != 0)
                  {
                      Console.WriteLine(x); 
                  }  
              }
              Console.ReadKey();
          }
  </code></pre>
  
  <p>I don't know where the problem is and also if the for inside resets.</p>