Added output tp q5.cpp