Prob1 cpp complete.