home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
SIMTEL
/
CPMUG
/
CPMUG026.ARK
/
WEATHER.ASC
< prev
next >
Wrap
Text File
|
1984-04-29
|
8KB
|
254 lines
100 DIM S$(10)
110 PRINT"THIS PROGRAM WILL ATTEMPT TO PREDICT TOMORROWS WEATHER IF"
120 PRINT"GIVEN THE WEATHER STATISTICS FROM THE PAST TWO DAYS."
130 PRINT TAB(5);"SEASON"
140 INPUT S$(1)
150 GOSUB 1500
160 GOTO 130
170 PRINT"AFTER THE FOLLOWING QUESTION MARKS YOU WILL BE REQUIRED"
180 PRINT"TO INPUT TWO VALUES, ONE FOR YESTERDAY'S READING AND ONE"
190 PRINT"FOR TODAY'S READING. SEPERATE THESE READINGS BY A COMMA."
200 PRINT TAB(5);"TEMPERATURE"
210 INPUT T1,T2
220 GOSUB 1570
230 GOTO 200
240 PRINT TAB(5);"BAROMETER"
250 INPUT B1,B2
260 GOSUB 1640
270 GOTO 240
280 PRINT TAB(5);"BAROMETER TENDENCY(1=RISING,2=FALLING,3=STEADY):"
290 INPUT T3,T4
300 GOSUB 1710
310 GOTO 280
320 PRINT TAB(5);"RELATIVE HUMIDITY"
330 INPUT H1,H2
340 GOSUB 1780
350 GOTO 320
360 PRINT TAB(5);"CLOUDS(1=STRATUS,2=CUMULUS,3=CIRRUS)"
370 INPUT C1,C2
380 GOSUB 1850
390 GOTO 360
400 PRINT TAB(5);"CLOUD COVER(PERCENTAGE)"
410 INPUT C4,C5
420 GOSUB 1920
430 GOTO 400
440 PRINT TAB(5);"WIND DIRECTION (1=NORTH,2=SOUTH,3=EAST,4=WEST)"
450 INPUTD1,D2
460 GOSUB 1990
470 GOTO 440
480 PRINT TAB(5);"WIND SPEED"
490 INPUT S2,S3
500 GOSUB 2060
510 GOTO 480
520 PRINT
530 PRINT
540 PRINT
550 PRINT"------------------------------------------------------"
560 PRINT"PRESENT SEASON IS ";S$(1)
570 PRINT
580 PRINT "FORECAST FOR TOMORROW:"
590 PRINT
600 PRINT
610 PRINT"TEMPERATURES:"
620 LET T7=((T1+T2)/2)-30
630 LET T6=T7+10
640 PRINT "LOWS TONIGHT BETWEEN";T7;"AND";T6;"DEGREES"
650 LET T9=((T1+T2)/2)+5
660 LET T8=T9-5
670 PRINT "HIGHS TOMORROW NIGHT BETWEEN";T8;"AND";T9;"DEGREES"
680 LET T0=T7-5
690 PRINT "LOWS TOMORROW NIGHT BETWEEN ";T0;"AND";T7;"DEGREES"
700 LET B4=(B1+B2)/2
710 B0=INT(ABS(B1-B2))
720 LET T9=(T3+T4)/2
730 LET T9=INT(T9)
740 IF T9=2 THEN 780
750 IF T9=3 THEN 800
760 PRINT"BAROMETER";B4;" AND RISING."
770 GOTO 810
780 PRINT"BAROMETER";B4;" AND FALLING."
790 GOTO 810
800 PRINT"BAROMETER";B4;" AND STEADY."
810 LET H3=((H1+H2)/2)+5
820 LET H4=H3-5
830 PRINT "HUMIDITY BETWEEN ";H4;"AND ";H3;"PERCENT"
840 LET C3=(C1+C2)/2
850 LET C3=INT(C3)
860 LET C9=((C4+C5)/2)+5
870 LET C8=C9-5
880 PRINT"CLOUD COVER BETWEEN";C8;"AND";C9;"PERCENT"
890 IF C3=2 THEN 940
900 IF C3=3 THEN 970
910 PRINT"CLOUD HEIGHT BETWEEN 500 TO 580 FEET."
920 PRINT"MAJOR CLOUD TYPE WILL BE STRATUS."
930 GOTO 990
940 PRINT"CLOUD HEIGHT BETWEEN 1550 TO 1800 FEET."
950 PRINT"MAJOR CLOUD TYPE WILL BE CUMULUS."
960 GOTO 990
970 PRINT"CLOUD HEIGHT BETWEEN 16500 TO 17000 FEET."
980 PRINT"MAJOR CLOUD TYPE WILL BE CIRRUS."
990 LET D5=(D1+D2)/2
1000 LET D5=INT(D5)
1010 LET S5=((S2+S3)/2)+5
1020 LET S6=S5-5
1030 IF D5=2 THEN 1080
1040 IF D5=3 THEN 1100
1050 IF D5=4 THEN 1120
1060 PRINT"WIND FROM THE NORTH FROM";S6;"TO";S5;"MPH"
1070 GOTO 1130
1080 PRINT"WIND FROM THE SOUTH FROM";S6;"TO";S5;"MPH"
1090 GOTO 1130
1100 PRINT "WIND FORM THE EAST FROM";S6;"TO";S5;"MPH"
1110 GOTO 1130
1120 PRINT"WIND FROM THE WEST FROM";S6;"TO";S5;"MPH"
1130 PRINT"CHANCE OF PRECIPITATION:"
1140 LET P1=INT((((C5/2)+B2)+C2)/.5)
1150 IF P1>100 THEN 2170
1160 PRINT "TONIGHT";P1;"%"
1170 LET P2=INT(((C9/2)+B4)+C3)
1180 IF P2>100 THEN 2190
1190 PRINT"TOMORROW";P2;"%"
1200 IF P3>100 THEN 2210
1210 PRINT"TOMORROW NIGHT";P3;"%"
1220 PRINT
1230 IF C2=2 THEN 1340
1240 IF C2=3 THEN 1420
1250 PRINT"FORECAST FOR TOMORROWS WEATHER:"
1260 PRINT
1270 PRINT"IT SHOULD BE FAIR TOMORROW."
1280 IF S$(1)="SPRING"THEN 1320
1290 IF S$(1)="SUMMER"THEN 1320
1300 PRINT"IT SHOULD BE COOLER TOMORROW WITH NO PRECIPITATION LIKELY."
1310 GOTO 1490
1320 PRINT"IT SHOULD BE WARMER TOMORROW WITH NO PRECIPITATION LIKELY."
1330 GOTO 1490
1340 PRINT"FORECAST FOR TOMORROWS WEATHER."
1350 PRINT
1360 IF S$(1)="SUMMER"THEN 1390
1370 PRINT"IT SHOULD BE FAIR TOMORROW."
1380 GOTO 1280
1390 PRINT"IF THEY ARE HEAVY CLOUDS--BE READY FOR RAIN."
1400 PRINT"IF THE CLOUDS ARE LIGHT--IT WILL BE FAIR."
1410 GOTO 1490
1420 IF S$(1)="FALL" THEN 1490
1430 PRINT
1440 IF S$(1)="SPRING"THEN 1480
1450 IF S$(1)="SUMMER"THEN 1480
1460 PRINT"TOMORROW,EXPECT SNOW TO FALL FOLLOWED BY HIGHER TEMPERATURES."
1470 GOTO 1490
1480 PRINT"TOMORROW,EXPECT RAIN TO FALL FOLLOWED BY HIGHER TEMPERATURES."
1490 GOTO 2130
1500 IF S$(1)="WINTER"THEN 170
1510 IF S$(1)="FALL"THEN 170
1520 IF S$(1)="SPRING"THEN 170
1530 IF S$(1)="SUMMER" THEN 170
1540 PRINT TAB(5);"LETS TRY THAT ONE AGAIN(SEASONS:WINTER,SPRING";
1550 PRINT"FALL,SUMMER)..."
1560 RETURN
1570 IF T1>135 THEN 1620
1580 IF T1<-80 THEN 1620
1590 IF T2>135 THEN 1620
1600 IF T2<-80 THEN 1620
1610 GOTO 240
1620 PRINT TAB(5);"LETS TRY THAT ONE AGAIN(NORMALS-80-135)..."
1630 RETURN
1640 IF B1>31.5 THEN 1690
1650 IF B1<28.5 THEN 1690
1660 IF B2>31.5 THEN 1690
1670 IF B2<28.5 THEN 1690
1680 GOTO 280
1690 PRINT TAB(5);"LETS TRY THAT ONE AGAIN(NORMALS:28.5-31.5)..."
1700 RETURN
1710 IF T3<1 THEN 1760
1720 IF T3>3 THEN 1760
1730 IF T4<1 THEN 1760
1740 IF T4>3 THEN 1760
1750 GOTO 320
1760 PRINT TAB(5);"LETS TRY THAT ONE AGAIN..."
1770 RETURN
1780 IF H1<0 THEN 1830
1790 IF H1>100 THEN 1830
1800 IF H2<0 THEN 1830
1810 IF H2>100 THEN 1830
1820 GOTO 360
1830 PRINT TAB(5);"LETS TRY THAT ONE AGAIN(HUMIDITY:0-100)..."
1840 RETURN
1850 IF C1<1 THEN 1900
1860 IF C1>3 THEN 1900
1870 IF C2<1 THEN 1900
1880 IF C2>3 THEN 1900
1890 GOTO 400
1900 PRINT TAB(5);"LETS TRY THAT ONE AGAIN..."
1910 RETURN
1920 IF C4<0 THEN 1970
1930 IF C4>100 THEN 1970
1940 IF C5<0 THEN 1970
1950 IF C5>100 THEN 1970
1960 GOTO 440
1970 PRINT TAB(5);"LETS TRY THAT ONE AGAIN(COVER:0-100)..."
1980 RETURN
1990 IF D1<1 THEN 2040
2000 IF D1>4 THEN 2040
2010 IF D2<1 THEN 2040
2020 IF D2>4 THEN 2040
2030 GOTO 480
2040 PRINT TAB(5);"LETS TRY THAT ONE AGAIN..."
2050 RETURN
2060 IF S2<0 THEN 2110
2070 IF S2>75 THEN 2110
2080 IF S3<0 THEN 2110
2090 IF S3>75 THEN 2110
2100 GOTO 520
2110 PRINT TAB(5);"LETS TRY THAT ON E AGAIN(NORMAL:0-75)..."
2120 RETURN
2130 GOSUB 2230
2140 PRINT"THE END"
2150 PRINT"---------------------------------------------------"
2160 STOP
2170 LET P1=100
2180 GOTO 1160
2190 LET P2=100
2200 GOTO 1190
2210 LET P3=100
2220 GOTO 1210
2230 IF D2=2 THEN 2390
2240 IF D2=3 THEN 2480
2250 IF D2=1 THEN 2580
2260 IF B2=>30.2 THEN 2340
2270 IF B2=>30.1 THEN 2300
2280 PRINT"IT WILL BE CLEARING AND COLDER TOMORROW."
2290 GOTO 2620
2300 IF T2=3 THEN 2330
2310 PRINT"IT WILL BE FAIR TOMORROW, FOLLOWED BY WINDS AND PRECIPITATION."
2320 GOTO 2620
2330 PRINT"IT WILL BE FAIR TOMORROW, WITH LITTLE TEMPERATURE CHANGE."
2340 IF T2=3 THEN 2370
2350 PRINT"IT WILL BE FAIR TOMORROW WITH SLOWLY RISING TEMPERATURES."
2360 GOTO 2620
2370 PRINT "IT WILL BE CONTINUED FAIR TOMORROW."
2380 GOTO 2620
2390 IF B2<=29.8 THEN 2450
2400 IF B2<=30! THEN 2430
2410 PRINT"IT WILL BE WINDY WITH RAIN IN 12-24 HOURS."
2420 GOTO 2620
2430 PRINT"IT WILL BE CLEARING AND FAIR FOR SEVERAL DAYS FOLLOWING."
2440 GOTO 2620
2450 PRINT"THERE WILL BE A SEVERE STORM IN 24 HOURS FOLLOWED BY ";
2460 PRINT"CLEARING."
2470 GOTO 2620
2480 IF B2<=29.8 THEN 2530
2490 IF B2=> 30.1 THEN 2550
2500 PRINT"IN WINTER, EXPECT SNOW WITH WINDS."
2510 PRINT"IN SUMMER, EXPECT A LONG DRY SPELL."
2520 GOTO 2620
2530 PRINT"THERE WILL BE A NORTHEAST WIND WITH HEAVY PRECIPITATION."
2540 GOTO 2620
2550 PRINT"IN WINTER, EXPECT SNOW IN 24 HOURS."
2560 PRINT"IN SUMMER, EXPECT A DRY SPELL."
2570 GOTO 2620
2580 IF B2<=30! THEN 2610
2590 PRINT"RAIN WILL CONTINUE WITH WINDS FOR 36 HOURS, THEN CLEARING."
2600 GOTO 2620
2610 PRINT "RAIN WILL FALL IN 12 TO 18 HOURS."
2620 RETURN