Elavon interview question

Basic coding question (very easy)