Find the sum of all integers from 1 to 50 inclusive.
Note
The sum of first n natural numbers is n(n+1)/2, so for n = 50 the sum is 50 × 51 / 2 = 1275.
Find the sum of all integers from 1 to 50 inclusive.
The sum of first n natural numbers is n(n+1)/2, so for n = 50 the sum is 50 × 51 / 2 = 1275.