Question: write an algoritm to determine whether an integer is prime of composite. The algorithm should return a 0 if the in - teger is prime,
write an algoritm to determine whether an integer is prime of composite. The algorithm should return a if the integer is prime, a if the integer is composite and a if the integer is neither prime nor composite and a if the integer is less than you may assume that the algorithm numberOfDivisors, defined in exercise is available
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
