added task2.cpp
Added task2