W3 Engineers interview question

A simple basic loop problem. Pattern print.