docs/euler/1.template in code-ruby-0.4.0 vs docs/euler/1.template in code-ruby-0.5.0
- old
+ new
@@ -1,14 +1,10 @@
{
sum = 0
- i = 1
-
- while i < 1000
+ 1000.times do |i|
if i % 3 == 0 or i % 5 == 0
sum += i
end
-
- i += 1
end
sum