/*
Write a program to read a positive integer n greater than 1 and 
to print if n is prime. If n is less than or equal to 1, print an error 
message.
*/
#include <iostream>
using namespace std;
int main()
{
	int i, n, count;
	cout << "Enter a pos. integer > 1: ";
	cin >> n;
	count = 0;
	if (n > 1)
	{
		for (i = 2; i < n; i++)
			if (n % i == 0)
			{
				count++;
			}
		if (count == 0)
			cout << n << " is prime.\n";
		else
			cout << n << " is not prime.\n";
	}
	else
		cout << "The number should be > 1.\n";
	return 0;
}
