You are given a positive integer n. Your task is to find and print the sum of the first n natural numbers, that is, add all numbers starting from 1 up to n and return the final sum.
The result should be displayed as a single integer.
Example 1
Input: 5
Output: 15
Explanation: 1+2+3+4+5 = 15
Example 2
Input: 10
Output: 55
Explanation: 1+2+3+4+5+6+7+8+9+10 = 55
Sign in to write, run, and submit your solution against the full test suite.