Cognizant interview question

print palendrome , print triangle