added my code to cp.cpp
Merge pull request #1 from amyll001/master

added my code to cp.cpp