Added solution to problem 10.

Modified isPrime-method in C/C++-solutions of problems 3 and 7. Found out that there is a need to search for primes only until the square root of the number.