Chapter 2: Problem 20
Design an algorithm that is given a positive integer \(N\) and determines whether \(N\) is a prime number, that is, not evenly divisible by any value other than 1 and itself. The output of your algorithm is either the message 'not prime', along with a factor of \(N\), or the message 'prime'.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.