2 scripts tagged as: [license · cc 3.0 attribution only]
Natural numbers sum | ||
natural-numbers-sum.r | 1.0 KB 27 Sep 2014 | Sums all the natural numbers up to
a given input.
Uses the equality:
1 + 2 + 3 +... + n = n*(n+1)/2
to avoid looping. author: Caridorc |
Natural numbers sum | ||
nutural-numbers-sum.r | 1.0 KB 27 Sep 2014 | Sums all the natural numbers up to
a given input.
Uses the equality:
1 + 2 + 3 +... + n = n*(n+1)/2
to avoid looping. author: Caridorc |