Skip to content

Latest commit

 

History

History

sum-numbers

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Write a function sumTo(number) that calculates the sum of the numbers 1 + 2 + ... + number.

Make it with three ways:

  1. with for loop
  2. with recursion
  3. with arithmetic progression
  4. with tail recursion(*)