bool isPrime(int num)
{
int sqrt_num = sqrt(num);
for(int i = 3; i < sqrt_num; i += 2)
if (num % i == 0)
return false;
return true;
}
void main()
{
int s[100] = {2};
for (int i = 3, j = 1; i < 100; i += 2)
{
if (isPrime(i))
s[j++] = i;
}
}