C5i interview question

Pattern using nested loop