//WAP TO FIND WHETHER ENTERED NUMBER IS A PRIME NUMBER OR NOT
#include<iostream.h>
#include<conio.h>
void main()
{
	int no,i;
	char p;
	clrscr();
	do
	{
		p='y';
		cout<<"\nEnter a number";
		cin>>no;
		if(no==1)
		p='n';
		else
		{
			for(i=2;i<no/2;i++)
			{
				if(no%2==0)
				{
					p='n';
					break;
				}
			}
		}
		if(p=='n')
		cout<<"\nNot a Prime Number!!Enter again";
	}while(p=='n');
	cout<<"\nPrime Number is :"<<no;
	getch();
}


