Cpp version of Exercise 1 added