#include <stdio.h>
int main()
{
int i,x,n=0;
printf("Enter a positive number:\n");
scanf("%d", &x);
for(i = 2; i < x; i++)
{
if(x%i!=0)
{ n=1;
}
else
{n=0;
break;}
}
if(n==1)
{printf("prime");}
else{printf("not prime");}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: