13th May 2018, 9:38 AM
Fahim UL Haque
Fahim UL Haque - avatar
2 Respostas
+ 4
As pointed out by ifl, you have to 'eat' the last character. b=gets.chomp
13th May 2018, 9:56 AM
Hatsy Rei
Hatsy Rei - avatar
+ 3
because the end of line is included in your input, so a and b have different values. add the following line to demonstrate it. puts '='+b+'='
13th May 2018, 9:43 AM
ifl
ifl - avatar