Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- abc = {a:1, b:2, c:3, d:4}
- r = 0
- abc.each {|x, y| r += y if y%2 != 0 }
- puts r
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement