Determines whether a Natural Number is Prime

This program determines whether a natural number n is prime or not.
If n is not prime, then it returns the number of nontrivial divisors
of n, where the nontrivial divisors are those different than 1 and n.
Enter a (a nonzero integer):

Result
Is n prime?
Number of nontrivial divisors:

Back to the Programs