C++ school task