Quote:
|
Originally Posted by InfoGeek
You don't need to write a separate program to test your program. You can ask the user for a number under which you want to test the number for being prime. then you can have another loop that iterates from 3 to num and check each for being prime(you can increment the counter by 2 as only odd numbers are prime).
|
I believe he's talking about unit testing. What platform are you developing on, sixstringartist?
Also, at a guess, I'd say that sixstringartist knows a thing or two about finding primes already. As he correctly remarks, you only need to test up to the square root of the number to check if it is prime or not, which suggests that he's already familiar with how to efficiently test for primes. So I'm not sure you need to give him advice there
