Cognizant interview question

Write a pattern program (Pyramid using stars).