Editor only displaying last line of code


#1




In the editor it is only displaying the answer for the 3rd line of the code - 13209 / 17. How do I get all 3?


sum = 13 + 379
product = 923 * 15
quotient = 13209 / 17


#2

There are no puts or print statements, so the output is an echo of the last statement. It's the behavior of the old composer environment.

To see all three, puts each one.

puts sum
puts product
puts quotient

Now it should print all three, possibly followed by nil, which can be ignored. The new environment does not have this artefact echo owing that it raised a lot of questions in the past.


#3

Cool, I tried with puts, and it displays all three. Thanks again for your help!


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.