fork download
  1. list = %w(18 22 11 73 91 38 24 17)
  2. # 偶数のみ表示する
  3. for i in 0...list.size do
  4. element = list[i].to_i
  5. if element.even?
  6. puts element
  7. end
  8. end
Success #stdin #stdout 0.03s 9664KB
stdin
Standard input is empty
stdout
18
22
38
24