Microsoft Interview Question

simple coding question