Microsoft Interview Question

Write a program to do X