Cabela's Interview Question

write as/400 code for logic