C++ version of HPC #6

bern_mod_v1.cpp
bern_mod_v2.cpp