# Temperature.bas draw -1 draw "Enter value, then",40,20 draw "choose conversion",40,30 form fld 40,60,40,12, "",1 form btn 40,80,60,14, "°F to °C",1 form btn 40,100,60,14, "°C to °F",1 form cbx 25,120,w,h,"",1 draw "Check for precise answer",40,122 while 1 a$ = input$(1) b=val(s$(0)) k=asc(a$)-14 if k = 1 then x = (b-32)*5/9 if k = 2 then x = b*9/5+32 if k=2 then f$="degrees Farenheight." else f$="degrees Celcius." f=s$(1) if f=0 then goto doround if f=1 then goto noround doround: y = round(x) print "Converted temperature is",y,f$ wend noround: y=x print "Converted temperature is",y,f$ wend end