#!/usr/bin/ruby def sum(last, current, sum) if current >= 4000000 return sum end if current % 2 == 0 sum += current end sum(current,last+ current, sum) end puts sum(0, 1, 0)