Challenge 20 - Finding the nth Triangular Number Image Challenge 20 - Finding the nth Triangular Number

In this challenge, you are going to implement the TriangularNumbers function which takes in n and returns the nth triangular number.

n = 1
result = 1

n = 3
result = 6

See the Solution

Feel free to have a look at the forum discussion thread for this challenge and contribute with your own solutions here - Challenge 20 - Triangular Numbers

Further Reading:

If you like this challenge then you may also appreciate some of the following articles on the site:


Other Challenges