- Wind chill temperature table -

Highlight the following code and save it as a text file called CHILL.BAS
Put it in the same folder as GW-BASIC.EXE. Load it and run it.

10 REM Wind chill temperature table
20 CLEAR :CLS :KEY OFF
30 PRINT SPC(27);"WIND  CHILL  TEMPERATURE" : PRINT
40 PRINT SPC(27);"Temperature (Fahrenheit)"
50 PRINT "         ";
60 FOR T = 30 TO -30 STEP -5
70   PRINT USING "#####";T;
80 NEXT T
90 PRINT : PRINT "Wind speed"
100 PRINT "miles/hour"
110 FOR V = 5 TO 80 STEP 5
120   PRINT USING "########";V;
130   PRINT " ";
140   FOR T = 30 TO -30 STEP -5
150     A = 35.74 + .6215*T - 35.75*V^.16 + .4275*T*V^.16
160     PRINT USING "#####";A;
170   NEXT T
180 PRINT
190 NEXT V
200 END

Previous | Home | Next