C++ practice small exercises