Homework&Exercise of C++