Barclays Interview Question

why this program