Solved

Pages: 12
you don't actually CALL isprime in main... (not counting the list of small primes)
you need something like line 52 for the biggest digit but that does similar for isprime.

you can add it inside the same if-block that does biggest digit there.
I recommend the output tell you something more than true/false, eg "the value is prime" or 'not prime'.
you can actually tell cout to write words for true/false for bools and bool expressions. Its usually not quite what you want, but its there if you want to play with it.

you can just return in main, if they try too many times, to avoid checking that. it will stop the program and do nothing more.
Last edited on
Topic archived. No new replies allowed.
Pages: 12