HW4:task1: main.cpp fixed