Let's build off of yesterday's problem and create another threaded program. Today's objective is to create a program that spawns several prime number checkers. Each prime number checker will generate a random number between 1 and 1,000 then determine if it is prime or not. If a number is prime add it to a shared variable which is initialized at 0. Once that shared variable reaches a prime number greater than 100,000 stop all threads and print out the number.
Good luck!
Comments: