Assignment
Assignment
for(i=2;i<=n;i++)
{
if(p[i]!=0)
printf("%d,",i);
}
return 0;
}
OUTPUTS:
Observations and Key takeaways:
This is a method devised many years ago by the mathematician Eratosthenes of Cyrene.It
involves eliminating the numbers that are know not to be prime until only the prime numbers
remain.But its effective for small range of numbers, when numbers are large it takes time to
complete the program ,show us results.