We use cookies to personalise content and advertisements and to analyse access to our website. Furthermore, our partners for online advertising receive pseudonymised information about your use of our website. cookie policy and privacy policy.
 
+0  
 
0
26
3
avatar

What is the sum of all even numbers between 10 and 500 inclusive?

 Dec 3, 2019
 #1
avatar+978 
+2

10+12+14+...+498+500

Pair these up

500+10 is a group which equals 510

498+12 is a group which equals 510

 

Then find how many 510 groups there are, and mulitply that by 510

 Dec 3, 2019
 #3
avatar
+1

Begin:o=0;e=0;listforeach(m, d=(10, 11, 12, 13, 14, 15, 16, ...........496, 497, 498, 499, 500),if(m%2==0,e=e+m, o=o+m);print"Even Num =",e; print"Odd Num   =", o

 

Even Numbers = 62,730
Odd Numbers   = 62,475

 Dec 3, 2019

24 Online Users

avatar
avatar