110 FOR I=1 TO 10\PRINT CHR$(7);\NEXT I
120 PRINT "EARTH CONTROL CALLING LUNAR LANDER. OUR IBM COMPUTER"
130 PRINT "HAS LOST YOUR DESCENT PROGRAM. YOU ARE NOW UNDER MANUAL"
140 PRINT "CONTROL. USE ANY TIME INTERVAL YOU FEEL IS NECESSARY FOR"
150 PRINT "RETRO-ROCKET BURSTS. USE 0 OR ANY VALUE BETWEEN"
160 PRINT "8 AND 200 LBS./SEC. AS YOUR RETRO-ROCKET BURN RATE FOR"
170 PRINT "EACH BURN INTERVAL."
180 PRINT 
190 PRINT "WE'RE WITH YOU, FELLA!"
200 PRINT 
210 PRINT 
220 PRINT "    TIME    ALTITUDE   SPEED   FUEL WT  MOMENTUM  ";
230 PRINT "INTERVAL    RATE"
240 PRINT "    SEC    MILES FEET   FPS      LBS    RELATIVE";
250 PRINT "     SEC     LBS/SEC"
260 PRINT 
270 I1=0
280 L=0
290 A=120
300 V=1
310 M=32500
320 N=16500
330 G=1.00000E-03
340 Z=1.8
350 Q1=5
360 Q2=L
370 GOSUB 1050 
380 Q1=13
390 Q2=SGN(A)*INT(ABS(A))
400 GOSUB 1050 
410 Q1=19
420 Q2=INT(5280*(A-SGN(A)*INT(ABS(A))))
430 GOSUB 1050 
440 Q1=26
450 Q2=INT(5280*V)
460 GOSUB 1050 
470 Q1=35
480 Q2=INT(M-N)
490 GOSUB 1050 
500 Q1=43
510 Q2=INT(M*V/32.5)
520 GOSUB 1050 
530 IF I1=0 THEN 580 
540 K=0
550 T=20
560 PRINT 
570 GO TO 600 
580 PRINT TAB(51);
590 INPUT T,K
600 IF K<0 THEN 640 
610 IF K=0 THEN 700 
620 IF K<8 THEN 640 
630 IF K<=200 THEN 700 
640 PRINT "NOT POSSIBLE";
650 FOR X=1 TO 44
660 PRINT ".";
670 NEXT X
680 INPUT K
690 GO TO 600 
700 IF ABS(M-N)<1.00000E-03 THEN 1110 
710 IF T<1.00000E-03 THEN 350 
720 S=T
730 IF (N+S*K)-M<=0 THEN 760 
740 IF K=0 THEN 760 
750 S=(M-N)/K
760 GOSUB 1010 
770 IF I<=0 THEN 880 
780 IF V<=0 THEN 800 
790 IF J<0 THEN 930 
800 GOSUB 820 
810 GO TO 700 
820 L=L+S
830 T=T-S
840 M=M-S*K
850 A=I
860 V=J
870 RETURN
880 IF S<5.00000E-03 THEN 1160 
890 S=2*A/(V+SQR(V*V+2*A*(G-Z*K/M)))
900 GOSUB 1010 
910 GOSUB 820 
920 GO TO 880 
930 W=(1-M*G/(Z*K))/2
940 S=M*V/(Z*K*(W+SQR(W*W+V/Z)))+.05
950 GOSUB 1010 
960 IF I<=0 THEN 880 
970 GOSUB 820 
980 IF J>=0 THEN 700 
990 IF V<=0 THEN 700 
1000 GO TO 930 
1010 Q=S*K/M
1015 IF Q<1.00000E-07GO TO 1420 
1020 J=V+G*S+Z*(-Q-Q^2/2-Q^3/3-Q^4/4-Q^5/5)
1030 I=A-G*S*S/2-V*S+Z*S*(Q/2+Q^2/6+Q^3/12+Q^4/20+Q^5/30)
1040 RETURN
1050 IF Q2=0 THEN 1080 
1060 PRINT TAB(Q1-INT(LOG(.5+ABS(Q2))/LOG(10)));
1070 GO TO 1090 
1080 PRINT TAB(Q1);
1090 PRINT Q2;
1100 RETURN
1110 IF I1<>0 THEN 710 
1120 I1=1
1130 PRINT "OUT OF FUEL AT"L"SECS"
1140 K=0
1150 GO TO 710 
1160 PRINT "ON THE MOON AT"L"SECS"
1170 W=3600*V
1180 PRINT "IMPACT VELOCITY OF"W"M.P.H.  ("V*5280"F.P.S.)"
1190 IF ABS(M-N)>.01 THEN 1210 
1200 N=M
1210 PRINT "FUEL LEFT"M-N"LBS."
1220 IF W>1 THEN 1250 
1230 PRINT "PERFECT LANDING ! - (LUCKY)"
1240 GO TO 1370 
1250 IF W>10 THEN 1280 
1260 PRINT "GOOD LANDING - (COULD BE BETTER)"
1270 GO TO 1370 
1280 IF W>25 THEN 1310 
1290 PRINT "CONGRATULATIONS ON A POOR LANDING"
1300 GO TO 1370 
1310 IF W>60 THEN 1340 
1320 PRINT "CRAFT DAMAGE. GOOD LUCK!"
1330 GO TO 1370 
1340 PRINT "SORRY, BUT THERE WERE NO SURVIVORS-YOU BLEW IT!"
1350 PRINT "IN FACT YOU BLASTED A NEW LUNAR CRATER"W*.277777;
1360 PRINT "FEET DEEP"
1370 PRINT 
1380 GO TO 210 
1400 STOP
1420 LET Q=0\GO TO 1020 
9999 END
