Problem 5. Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because
which can be displayed in a triangular shape like so
Thus 6 = triangle(3). Given n, return t, the triangular number for n.
Solution CommentsShow comments
Problem Recent Solvers25135