modified homework10.cc
modified warm9