A C++ brute force using Euler's method.