Week 2 challenges in C++