Cyntexa Interview Question

Code to print given triangle pattern.