int n = int.Parse(textBox2.Text);
int Primes[n + 1];
for (int i = 0; i <= Sqrt(n); i++)
Primes[i] = 1;
Primes[0] = 0;
Primes[1] = 0;
for(int i = 2; i <= n; i++)
{
if(Primes[i] == 1)
{
for (int j = 2; i * j <= n; j++)
Primes[i * j] = 0;
}
}
The error is the subject!
I marked error code as red!
Is anyone know why?
Thanks

Sujeet SumanPosted Oct 9, 2015, 11:44 PM
Priyaranjan K SPosted Oct 10, 2015, 11:14 AM
Sujeet SumanPosted Oct 10, 2015, 11:06 AM
Quang Dinh LuongPosted Oct 10, 2015, 10:42 AM
Priyaranjan K SPosted Oct 9, 2015, 10:32 PM
If you found this useful Please mark this as Answer