Added the implementation of problem 39.
Added implementation of problem 40.
Add implementation of problem 41.
Added implementation of problem 42.
Added the implementation of problem 45.
Added the implementation of problem 46.
Added the implementation of problem 47.
Added the getPrimes function to the Functions class.
Added implementation of problem 49.
Added implementation to problem 50.