Solved Problem 4

Solved problem 4 and refactored for version 2. Made small change in
Euler3v2.