June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
|
|
@ -1,16 +1,16 @@
|
|||
BEGIN
|
||||
INTEGER I, PASS;
|
||||
BOOLEAN ARRAY DOORS(1:100);
|
||||
INTEGER LIMIT = 100, door, stride;
|
||||
BOOLEAN ARRAY DOORS(1:LIMIT);
|
||||
TEXT intro;
|
||||
|
||||
FOR I := 1 STEP 1 UNTIL 100 DO
|
||||
DOORS(I) := FALSE;
|
||||
|
||||
FOR PASS := 1 STEP 1 UNTIL 100 DO
|
||||
FOR I := PASS STEP PASS UNTIL 100 DO
|
||||
DOORS(I) := NOT DOORS(I);
|
||||
|
||||
FOR I := 1 STEP 1 UNTIL 100 DO
|
||||
IF DOORS(I)
|
||||
THEN BEGIN OUTTEXT("DOOR "); OUTINT(I,0); OUTTEXT(" IS OPEN"); OUTIMAGE END
|
||||
FOR stride := 1 STEP 1 UNTIL LIMIT DO
|
||||
FOR door := stride STEP stride UNTIL LIMIT DO
|
||||
DOORS(door) := NOT DOORS(door);
|
||||
|
||||
intro :- "All doors closed but ";
|
||||
FOR door := 1 STEP 1 UNTIL LIMIT DO
|
||||
IF DOORS(door) THEN BEGIN
|
||||
OUTTEXT(intro); OUTINT(door, 0); intro :- ", "
|
||||
END;
|
||||
OUTIMAGE
|
||||
END.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue