American Express Interview Question

Print a traingle pattern using code