anonymous
  • anonymous
Car Wash at stake - If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000.
OpenStudy Feedback
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
schrodinger
  • schrodinger
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
farmdawgnation
  • farmdawgnation
DIS IS REAL.
anonymous
  • anonymous
You're real
mattfeury
  • mattfeury
233168

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
No just answers...
mattfeury
  • mattfeury
var sum = 0; for(var i = 1; i < 1000; i++) { if (i % 5 == 0 || i % 3 == 0) sum += i }
anonymous
  • anonymous
give me a link to your code or scratch paper
anonymous
  • anonymous
Baller!
mattfeury
  • mattfeury
I bequeath the car wash to darthsid.
farmdawgnation
  • farmdawgnation
Winning is mattfeury!
anonymous
  • anonymous
very honorable feury
mattfeury
  • mattfeury
He's got a cute face.
anonymous
  • anonymous
Side, clean up dat Rav 4 and get some spinning rims while you're at it
anonymous
  • anonymous
they're hipster now, and listen to some baumstein at 11
darthsid
  • darthsid
ok so apparently my attempt to calculate it manually is wrong, can you guys figure out what is wrong with it? 1. Multiples of 3: There are 3 multiples of 3 in the first 10 numbers, so there are 1000mod3 = 333 multiples of 3 lower than 1000. So their sum should be 3(1+2+3...+333) 2. Multiples of 5: There are 2 multiples of 5 in the first 10 numbers, so there are 200 multiples of 5 in 1000. Their sum is 5(1+2+3..+200) The total comes out to be wrong. What's wrong?
darthsid
  • darthsid
So I have to not count 1000, and I have to subtract the sum of common multiples (of 15). But it is still wrong
anonymous
  • anonymous
Sid, you are the Ramanujan of this riddle
darthsid
  • darthsid
MY LOGIC IS CORRECT! Only mistake was in the calcs.
mattfeury
  • mattfeury
Sid, you are the Rashomon of this riddle.
anonymous
  • anonymous
This is elementary mutual inclusion exclusion.
anonymous
  • anonymous
And this is actually project Euler problem #1 http://projecteuler.net/problem=1
karatechopper
  • karatechopper
i believe this should be in math section;) jk
asnaseer
  • asnaseer
You could just do the following for all number between 1 and 999: 1) find the sum of all multiples of 3 - call it Sum3 2) find the sum of all multiples of 5 - call it Sum5 3) find the sum of all multiples of 15 - call it Sum15 the your answer would be Sum = Sum3 + Sum5 - Sum15 I subtract Sum15 from this because any multiple of 15 will be included in both Sum3 AND Sum5.

Looking for something else?

Not the answer you are looking for? Search for more explanations.