Standard Chartered Bank interview question

write a program