Ruby program to convert centimeters into millimeters
Following program shows you how to convert centimeters to millimeters.
In this program we get centimeters from user once we get those we need to multiply with 10 so that we get in millimeters
puts "Please enter centimeters:"
centimeters = Integer(gets.chomp)
millimeters = centimeters * 10
puts "#{millimeters} Millimeters"
Output:
Please enter centimeters:
10
100 Millimeters