Cognizant interview question

how to print a pattern ?