#include
#include
void main()
{
int n,a;
clrscr();
printf("the input value of n is");
scanf("%d",&n);
for(a=2;a{
if(n%a==0);
{
printf("%d is a not a prime number",n);
break;
}
}
if(a==n);
{
printf("%d is a prime number",n);
}
getch();
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment