Pregunta de entrevista de HARMAN

I was asked to write a program to generate some patterns