Synechron interview question

Triangle pattern program?