Synechron Interview Question

Triangle pattern program?