Add Up to N (Baby Steps)

Read n and print 1 + 2 + 3 + … + n.

Input: One integer n (1 to 10000).

Output: One integer: the total.

Difficulty: Easy. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.

Hint

  • Start a total at 0.

More Baby Steps practice