Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arr1 = [1,2,3,4]
- arr2 = [11,22,33,43]
- arr3 = [10, 20, 30, 40]
- for n1 <- arr1,
- n2 <- arr2,
- n3 <- arr3,
- res = (n1 + n2 + n3),
- res > 68 do
- "#{n1}+#{n2}+#{n3}=#{res}"
- end
- # ["1+33+40=74", "1+43+30=74", "1+43+40=84", "2+33+40=75", "2+43+30=75", "2+43+40=85", "3+33+40=76", "3+43+30=76", "3+43+40=86", "4+33+40=77", "4+43+30=77", "4+43+40=87"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement