Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.08 KB | None | 0 0
  1. abc = {a:1, b:2, c:3, d:4}
  2. r = 0
  3. abc.each {|x, y| r += y if y%2 != 0 }
  4. puts r
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement