C++: problems 3-5

Working on 6 and 7