You are on page 1of 3

[start]

cls

print "Temperature Converter"

button #CelsiustoFahrenheit,"Celsius to Fahrenheit",[Celsius to Fahrenheit]

button #FahrenheittoCelsius,"Fahrenheit to Celsius",[Fahrenheit to Celsius]

button #CelsiustoKelvin,"Celsius to Kelvin",[Celsius to Kelvin]

wait

[Celsius to Fahrenheit]

input "Celsius to Fahrenheit";C

print C;chr$(176);"C"

button #convert,"Convert to Fahrenheit",[Convert to Fahrenheit]

wait

goto [TC to TF]

[Fahrenheit to Celsius]

input "Fahrenheit to Celsius";F

print F;chr$(176);"F"

button #convert,"Fahrenheit to Celsius",[Convert to Celsius]

wait

goto [TF to TC]

[Celsius to Kelvin]

input "Celsius to Kelvin";C

print C;chr$(176);"C"

button #convert,"Celsius to Kelvin",[Convert to Kelvin]

wait

goto [TC to TK]


[TC to TF]

goto [F=(C*1.8)+32]

[Convert to Fahrenheit]

F=(C*1.8)+32

print F

print F;chr$(176);"F"

button #Reset,"Reset",[Reset]

wait

[Reset]

goto [start]

[TF to TC]

goto [C=(F-32)*0.5556]

[Convert to Celsius]

C=(F-32)*0.5556

print C

print C;chr$(176);"C"

button #Reset,"Reset",[Reset]

wait

[Reset]

goto [start]

[TC to TK]

goto [K=C+273.15]

[Convert to Kelvin]

K=C+273.15

print K

print K;chr$(176);"K"

button #Reset,"Reset",[Reset]
wait

[Reset]

goto [start]

You might also like