Question: A customer has asked you to writea program that can take in any list of numbers and print them out to display. Along with the
A customer has asked you to writea program that can take in any list of numbers and print them out to display. Along with the number that is printed out, the program must also display whether the number is a prime or not ( a prime is only divisible by 1 and itself i.e; 1, 2, 3, 5, 7, 11,..) The range of the numbers is from {1, 72}.
What is the effiecient way you can prove this? Hint; As with most programming problems, you can cut the amount of test in half if you divide and conquer".
sample test sets: {1, 2, 3, 25, 13, 4, 8, 16} {5, 17, 39, 1, 8, 6, 3, 3, 7}
{ } /* what data type is this? */ {2, 1, 40} nil {0, 72}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
