Objective

Determine whether a randomly-generated positive integer below 10 is a prime number or not.

Difficulty

Very easy

Description

A prime number is an integer greater than 1 that's only divisble by two numbers — itself and the number 1.

The first 10 primes are listed as follows: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29.

A composite number is the exact opposite of a prime. It's an integer that's divisble by more than two integers. For instance, 4 is composite. It's divisible by three integers: 1, 2, and 4.

In this exercise, you have to generate a random positive integer below 10 and then check whether it's a prime number.

If it is prime, print:

<integer> is prime.

or otherwise print:

<integer> is NOT prime.

where <integer> is the randomly-generated integer.

Shown below are a couple of examples:

4 is NOT prime.
1 is NOT prime.
3 is prime.