C++ Solutions 6-10