Mega Code Archive

 
Categories / Ruby / Language Basics
 

Simple Arithmetic

puts 1.0 + 2.0 puts 2.0 * 3.0 puts 5.0 - 8.0 puts 9.0 / 2.0 # This is what the program returns: 3.0 6.0 -3.0 4.5