Updated 10.cpp