homework for c++ programming