Checks number entered. Only checks up to sqrt(num) for Primes