a = 1
b = 2
sum = 0

while b <= 4_000_000
  c = a + b
  a = b
  b = c
  sum += a if a % 2 == 0
end

p sum

a = 1
b = 2
sum = 0

while b <= 4_000_000
  c = a + b
  a = b
  b = c
  sum += a if a.even?
end

p sum

Change in checking whether a number is even -> a % 2 == 0 to a.even?
Change in checking whether a number is even ->  a % 2 == 0 to a.even?
