Pregunta de entrevista de Groundswell Cloud Solutions

How would you code an algorithm to print a half pyramid?