HCLTech interview question

Write a program to print a palindrome and Number triangle