Sum of Integers from 1 to n
In this lesson, we'll learn how to find the sum of numbers from 1 to n.
What does the sum of integers from 1 to mean?
Natural numbers are positive numbers starting from . These can be written as:
We want to write a program that takes a number and sums up all the numbers from up to that number.
For example, if , then the sum of numbers from to ...