A hand-written C++ program (C-style) modelling the function of an elevator