Cognizant interview question

Pattern base program. Like print star in triangle shape