You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
int my_is_prime(int nb)
|
|
{
|
|
int i;
|
|
|
|
i = 2;
|
|
if (nb < 2)
|
|
return (0);
|
|
while (i <= nb / i)
|
|
{
|
|
if (nb % i == 0)
|
|
return (0);
|
|
i++;
|
|
}
|
|
return (1);
|
|
}
|