Pergunta de entrevista da empresa Synoriq

There was a coding question where I was asked to print a pattern.