simple code for printing triangle