by Ricardo Fernández Serrata
Version 2 (December 31, 2020)
Download (4 downloads)
3 different ways to add Natural numbers from 1 to N (both inclusive). Or compute the Nth Triangular Number (the Additive equivalent of Factorial)
Start "Input", input some number (obviously), and then start any or all the other flows to see that they're all correct.
I had to apply an offset of +1 to the For Loops because they always start counting at 0. If you want to count from 0 to N-1, delete the offset and make the alt xpr like this: inp * (inp - 1) / 2
ℹ
en.wikipedia.org/wiki/Triangular_number
en.wikipedia.org/wiki/1_%2B_2_%2B_3_%2B_4_%2B_%E2%8B%AF
5 stars | 0 | |
4 stars | 0 | |
3 stars | 1 | |
2 stars | 0 | |
1 star | 0 | |
Reports | 0 |
Reviews and ratings can be submitted in the app.