29th Jun 2019, 5:41 PM
Rubikon
4 Respuestas
+ 4
You need double quotes around #{age} like this: age = 42 one = "He is " two = " years old" print(one+"#{age}"+two)
29th Jun 2019, 6:02 PM
Paul
Paul - avatar
+ 2
Thank you
29th Jun 2019, 6:07 PM
Rubikon
+ 1
You can write it easier : age = 42 Puts "He is #{age} years old. "
11th Jul 2019, 11:52 AM
Maximilien Bernede
Maximilien Bernede - avatar
0
thankful
2nd Jul 2019, 8:25 AM
kyaw thu
kyaw thu - avatar