Answer Quiz-2

first using STL