Федосов - Лабораторная работа #2

If I want to add another mode, I have to change this function as well, which is no good. 

Please, try to think of how you can avoid that. (http://en.cppreference.com/w/cpp/language/enum).