#include<stdio.h>
int main()
{
int n,i,c=0;
printf("Enter any number\n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
if(n%i==0)
{
c++;
}
}
if(c==2)
{
printf("%d is prime",n);
}
else
{
printf("%d is nt prime",n);
}
}
OUTPUT
Enter any number
19
19 is prime
Visit Homepage
Comments
Post a Comment