C++ experiment 1 code 1.4