I wrote the following code in Ruby for Celsius to Fahrenheit conversion. I keep getting error. I am sure that I am still not clear on the concept of methods and that's why I cant figure it out.
puts "Enter the Degree in c:"
c = gets.chomp
def celsius_fahrenheit (f)
return f = ( c * 9 / 5) + 32
end
answer = "The #{celsius_fahrenheit (f)} equivalent is"
puts answer