cpp exercise