Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
11
12
celsiusToF = (c) -> (c * 9 / 5) + 32
fToCelsius = (f) -> (f - 32) * 5 / 9
updateUI = (temp, scale) ->
if scale == 'C'
print "#{temp}°C = #{celsiusToF temp}°F"
else
print "#{temp}°F = #{fToCelsius temp}°C"
# Simulate actions
updateUI 25, 'C'
updateUI 77, 'F'Coding works best on desktop or with an external keyboard.