Capgemini interview question

Write a code to print asterisk pattern