XYZ interview question

Pattern printing (triangle pattern with star and dot)