Happen Bank Interview Question

very basic question with some unnecessary tweaks.