abhaydchamp, on 22 February 2012 - 11:16 AM, said:
Similar to answer by Karel-Lodewijk with samall difference:
num1, num2 = gets.chomp.split(",").collect{|x| x.to_i}
num1, num2 = gets.chomp.split(",").collect{|x| x.to_i}
The difference is even smaller than you think, map and collect are aliases, it's the very same function.
This post has been edited by Karel-Lodewijk: 22 February 2012 - 07:52 PM

New Topic/Question
Reply




MultiQuote


|