December 22, 2024, 02:34:48 AM

1,531,361 Posts in 46,734 Topics by 1,523 Members
› View the most recent posts on the forum.


I decided to step up to Guff's challenge

Started by ncba93ivyase, January 19, 2009, 11:18:13 PM

previous topic - next topic

0 Members and 1 Guest are viewing this topic.

Go Down

Daddy


guff

QuoteCongratulations, the answer you gave to problem 46 is correct.

Nice work, Guff, you've just advanced another level.

baddood;

Daddy

I REVIVE THIS THREAD. THE POWER OF GOD
Code Select
#Find the sum of all the multiples of 3 or 5 below 1000.
sum=0
for i in (1..999)
if i%3==0 or i%5==0
sum+=i
end
end
puts sum


Problem 1 in Ruby.

guff

Quote from: ra-ˈkün on April 10, 2009, 10:35:41 AM
I REVIVE THIS THREAD. THE POWER OF GOD
Code Select
#Find the sum of all the multiples of 3 or 5 below 1000.
sum=0
for i in (1..999)
if i%3==0 or i%5==0
  sum+=i
end
end
puts sum


Problem 1 in Ruby.
already done punk  akudood;

Daddy


Go Up