GlobalLogic Interview Question

A simple pattern program and an easy coding question.