Capgemini interview question

A pattern printing programming question