Pregunta de entrevista de Exact

write a code that have output on below (Different Star output)