Modified quiz1.cpp and quiz2.cpp