+ 1
String Interpolation-problem
a = 5 b = 2 puts "The sum is #{a+b}" how to solve the following: a = .567 b = .789 puts "The sum is #{a+b}"
2 Answers
+ 3
The compiler tells you what to do. Put a 0 before the .
a = 0.567 and
b = 0.789
0
thanks it is right to explain it