I am brand new to programming and working through Proj Euler with Ruby. Why wont this ruby loop break?
(1..5).each do |a|
(1..5).each do |b|
e=(a*a)+(b*b)
c=Math.sqrt(e)
puts "a=#{a}, b=#{b}, c=#{c}"
break if a+b+c == 12
end
end
Note if I put anything else in the if statement (say puts "found it" if a+b+c == 12) it works just fine, it just won't break