Skip to content

Latest commit

 

History

History
 
 

add_upto

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Add up to

Instructions

Given positive integer n implement a function which calculates sum of all numbers from 1 up to (and including) number n.

Challenge | Solution

Examples

add_upto(1) # 1

add_upto(2) # 3

add_upto(3) # 6