Added p8.cpp, p9.cpp, and p10.cpp