Elbit Systems interview question

write a pseudo code or a C code that describe how an elevator makes a decision what is the next floor