Skip to content

Files

Latest commit

author
Aneta Solunska
Aug 8, 2024
f050d4e · Aug 8, 2024

History

History
This branch is 2 commits ahead of, 16 commits behind igorwojda/kotlin-coding-challenges:main.

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Aug 8, 2024
Jul 25, 2023
Feb 7, 2023

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

addUpTo(1) // 1

addUpTo(2) // 3

addUpTo(3) // 6