Write a program to check if a number n is composite or probably prime as follows. Choose 10 random numbers a1, a2, … , a10 between 2 and n − 1 and compute mod n for each ai. If (mod n) for any ai, return the message “n is composite.” If (mod n) for all the ai’s, return the message “n is probably prime.”
Incorporate this program into your factorization program as a way to check when a large number is prime.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.