User Tools

Site Tools


prelude_one_to_carmichael_numbers_--_primality_testing

This is an old revision of the document!


Prelude to Carmichael Numbers -- Primality Testing

First, start by reading the problem statement for Carmichael Numbers.

For this prelude, you are to test the primality of the input numbers.

Input

Input consists of a sequence of integers, one per line. The last entry is a 0, which should not be processed.

Output

For each non-zero input value, n, determine whether n is prime, then print n, a space, and either <tt>is prime</tt> or <tt>is not prime</tt>.

Sample Input

7
0

Sample Output

16
prelude_one_to_carmichael_numbers_--_primality_testing.1316955963.txt.gz · Last modified: 2011/09/25 06:06 by jtkorb