Cognizant interview question

Pattern program to draw a *pattern