IBM interview question

I just had basic coding test, bascially IBm want to check my logic and programming skills.