#include<iostream.h>
#include<conio.h>
void main()
{
int n,count=0;
cin>>n;
for(int i=1;i<=n;i++)
{
if(n%i==0)
count++;
}
if(count==2)
{
cout<<"the no. you entered is prime..";
}
else
{
cout<<"not a prime....";
}
getch();
}
No comments:
Post a Comment