私はこのコードを書きましたが、機能していません。私は本当に助けていただければ幸いです:
puts "Welcome to my unit conversion calculator. This calculator can convert
between Centimeters and Inches. If you could like to convert Centimeters to Inches,
write: in. If you would like to convert Inches to centimeters, write: cm."
unit = gets
puts " how many of your unit would you like to convert"
a = 0.39370079
b = 2.54
unit_number = gets.to_f
if unit = cm
(unit_number * a)
else unit = in
(unit_number * b)
end