class SpeedConverter
Attributes
speed[RW]
Public Instance Methods
convert()
click to toggle source
# File lib/speed_converter.rb, line 4 def convert puts "Enter speed in Km/h to convert to m/s" speed = gets.to_f ms = (speed *1000) /3600 puts ms.round(4) end