The sum of the all prime numbers from 1 to 100 is 1,161
101
The sum is 1,060
The sum of the even numbers is (26 + 28 + ... + 100); The sum of the odd numbers is (25 + 27 + ... + 99) Their difference is: (26 + 28 + ... + 100) - (25 + 27 + ... + 99) = (26 - 25) + (28 - 27) + ... + (100 - 99) = 1 + 1 + ... + 1 There are (100 - 26) ÷ 2 + 1 = 38 terms above which are all 1; their sum is 38 x 1 = 38. So the difference of the sum of all even numbers and all odd numbers 25-100 is 38.
The sum of the numbers from 1 through 100 is 5,050.
The sum of all the odd numbers from 1 through 100 is 10,000
The sum of these composite numbers, including 100, is 3989.The sum of all numbers between 1 and 100 is 5,050. From this we need to subtract the sum of 1 plus all the prime numbers below 100. The sum of the primes is 1,060. Subtracting (1 + 1060) or 1,061 from 5,050 yields 3,989.
The sum of the even numbers is (26 + 28 + ... + 100); The sum of the odd numbers is (25 + 27 + ... + 99) Their difference is: (26 + 28 + ... + 100) - (25 + 27 + ... + 99) = (26 - 25) + (28 - 27) + ... + (100 - 99) = 1 + 1 + ... + 1 There are (100 - 26) ÷ 2 + 1 = 38 terms above which are all 1; their sum is 38 x 1 = 38. So the difference of the sum of all even numbers and all odd numbers 25-100 is 38.
The sum of the numbers from 1 through 100 is 5,050.
5,050
over 50
1060
The total of all of the numbers from 1 to 99 is 4950.
The sum of the whole numbers from 1 to 100 inclusive is 5,050.
The sum is 2500.
n*(n+1)=sum 100*(100+1)=10100
You add the numbers in a loop. Here is an example in Java:int sum = 0;for (int i = 1; i