Modified quiz1.cpp