#include <iostream>
using namespace std;
#include <string.h>
bool nguyento(int a);
void main()
{
	hj:;

	int a;
	
	cout<<"Hay nhap so can kiem tra: "; cin>>a;system("cls");
	if (nguyento(a)==true)
		cout << " Day la so nguyen to" << endl;
	else cout <<"Day khong phai la so nguyen to" <<endl;

	system("pause"); system("cls"); cout<< "Ban co muon tiep tuc!!!!"<<endl;
	char *b, c[]="k", d[]="K";
	cin >>*b;
	cout <<*b<<endl;
	if(strcmp(b,c)!=0 ||strcmp(b,d)!=0)
		goto hj;
	system("pause");
}


bool nguyento(int a)
{
	if (a<2)
		return false;
	for (int i=2;i<=sqrt((float)a);i=i+1)
		if (a%i==0)
			{
				return false;
				break;
			}
	return true;

}