#include <stdio.h>
#include <stdlib.h>
int main()
{
int n,i,flag=0;
printf("ENTER THE NUMBER\n");
scanf("%d",&n);
for(i=2;i<n/2;i++){
if(n%i==0)
{
flag==1;
break;
}
if (flag==0){
printf("THIS IS A PRIME NUMBER");}
else{
printf("THIS IS NOT A PRIME NUMBER");}}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: