Homework 6 c++