#include
using namespace std;
int main()
{
cout << “Enter a number:\n”;
int num = 0, prime = 1;
cin >> num;
for (int i = 2; i <= (num/2); i++)
{
if ( num % i == 0)
{
prime = 0;
break;
}
else
{
prime = 1;
}
}
if (prime == 0)
{
cout << num <<" is not a prime number!\n";
}
else
{
cout << num << " is a prime number!\n";
}
return 0;
}