Find the sum of natural numbers between 1 and 100, which are divisible by 2 or 5.
Answers
Answered by
0
The sumnof n natural numbers 1+2+....+n = (n(n+1))/2
The sum of natural numbers divisible by 2 or 5 =
2(1 + 2 +......+ 50) + 5(1 + 2 +.....+ 20) - 10(1 + 2 +.....+10)
= 2 * (50*51 /2) + 5 * (20*21 /2) - 10 * (10*11 /2)
=2550 + 1050 - 550
=3050
so: the answer is 3050
The sum of natural numbers divisible by 2 or 5 =
2(1 + 2 +......+ 50) + 5(1 + 2 +.....+ 20) - 10(1 + 2 +.....+10)
= 2 * (50*51 /2) + 5 * (20*21 /2) - 10 * (10*11 /2)
=2550 + 1050 - 550
=3050
so: the answer is 3050
Similar questions