home *** CD-ROM | disk | FTP | other *** search
/ norge.freeshell.org (192.94.73.8) / 192.94.73.8.tar / 192.94.73.8 / pub / computers / cpm / alphatronic / ALGOL-M.ZIP / LUNAR.ALG < prev    next >
Text File  |  1999-03-13  |  1KB  |  49 lines

  1. BEGIN
  2. COMMENT UPDATED LUNAR LANDER FROM KILOBAUD AUGUST 78;
  3. DECIMAL F,V,D,B,C;
  4. INTEGER A;
  5. WRITE(TAB 8,"LUNAR LANDER MKII");
  6. WRITE(TAB 8,"+++++++++++++++++");
  7. WRITE(" ");
  8. WRITE("WOULD YOU LIKE INSTRUCTIONS?");
  9. WRITE("1=YES 0=NO");
  10. READ(A);
  11. IF A=1 THEN
  12.   BEGIN
  13.     WRITE("YOU HAVE 120 LBS OF FUEL");
  14.     WRITE("YOU ARE APPROACHING THE LUNAR");
  15.     WRITE("SURFACE AT 50 FT/SEC, AND");
  16.     WRITE("ARE CURRENTLY 500 FT FROM");
  17.     WRITE("THE SURFACE, TO CANCEL");
  18.     WRITE("GRAVITY BURN 5 LB FUEL");
  19.   END;
  20. A:=1;
  21. WHILE A=1 DO
  22. BEGIN
  23. WRITE("HAPPY LANDINGS!!!!");
  24. F:= 120.0; V:=50.0; D:=500.0;
  25. FUEL:WRITE("FUEL ", F);
  26. WRITE("SPEED ",V);
  27. WRITE("DISTANCE ",D);
  28. INPUTBURN:WRITE("ENTER YOUR BURN");
  29. READ(B);
  30. IF B>F THEN GOTO INPUTBURN;
  31. F:=F-B; C:=B-5.0; D:=D-V+C/2.0; V:=V-C;
  32. IF D>0 THEN GO TO FUEL;
  33. IF V>=5.0 THEN
  34.   BEGIN
  35.     WRITE("****!!!CRASH!!!****");
  36.     WRITE("YOU HIT THE MOON AT ", V," FT/SEC");
  37.   END
  38. ELSE
  39.   BEGIN
  40.     WRITE("WELL DONE - YOU LANDED OK");
  41.     WRITE("LANDING SPEED ",V," FT/SEC");
  42.     END;
  43. WRITE("DO YOU WANT ANOTHER TRY?");
  44. WRITE("1=YES, 0=NO");
  45. READ(A);
  46. END;
  47. WRITE("END");
  48. END
  49.