I know what this code does but I don't know How it works if someone can explain to me how it works I would be glad
const int Last_Number = 1000;
int Primes = 0;
Array Numbers = new Array(Last_Number, true);
for (int i = 2; i < Last_Number; i++)
{
if ( Numbers[i])
{
for (int j = i * 2; j < Last_Number; j += i)
{ Numbers[j] = false; }
}
}
for (int i = 1; i < Last_Number; i++)
{
if ( Numbers[i])
{
Primes++;
Console.Out.WriteLine (i);
}
}
Console.Out.WriteLine (i);
( "\n" + Primes + " Primes found in the range 2-" + Last_Number );