Posts by Diego Araujo • 1 point
1 post
-
-1
votes3
answers113
viewsA: Rest of division in ruby
You can try to do it in block too, it gets pretty organized =D resultado = [] values = [2, 7, 15, 11, 5] values.each { |num| resultado << num if n % 5 == 0 } puts resultado where the each will…
rubyanswered Diego Araujo 1