funtion of Perfect Square/ prime number

Oct 14, 2015 at 1:27am
I am trying to create a simple function that checks if a number that is entered by a user is a perfect square and another function that also checks if that same number is a prime number.
Oct 14, 2015 at 1:34am
closed account (48T7M4Gy)
Whatever you do see whether it is quicker to check for primalty first, because no primes are perfect squares.

Eratosthenes seive is an extremely simple and effective way of finding prime numbers, not so good for checking primalty though.
Topic archived. No new replies allowed.