Prime numbers code
<p>Why isn't this code working? It should bring me all the primes to 10 but instead I get the numbers 2 and 3 only.</p>

<pre><code>bool m = true;
int i;
int a;
for (a = 2; a &lt;= 10; a++)
{
    for (i = 2; i &lt; a; i++) 
    {
        if (a % i == 0)
        {
            m = false;
        }
    }

    if (m == true)
    {
        Console.WriteLine(a);
    }
}
Console.ReadKey();
</code></pre>
