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