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.
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
# include<math.h>
|
|
void is_prime(int n)
|
|
{
|
|
int i = 2;
|
|
while (i <= sqrt(n))
|
|
{
|
|
if (n%i == 0)
|
|
{
|
|
printf("\n %d\n", n);
|
|
break;
|
|
}
|
|
i++;
|
|
}
|
|
if(i > sqrt(n))
|
|
printf("\n %d\n", n);
|
|
}
|
|
int main()
|
|
{
|
|
int a = 9;
|
|
|
|
is_prime(a);
|
|
return 0;
|
|
}
|