Added checking for division by zero
Added checking for division by zero

mtrempoltsev/msu_cpp_autumn_2017,mtrempoltsev/msu_cpp_autumn_2017,mtrempoltsev/msu_cpp_autumn_2017,mtrempoltsev/msu_cpp_autumn_2017