C++ tasks for exam