Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,26 @@
MODULE McNuggets;
FROM InOut IMPORT WriteCard, WriteString, WriteLn;
CONST Max = 100;
VAR a, b, c: CARDINAL;
nugget: ARRAY [0..Max] OF BOOLEAN;
BEGIN
FOR a := 0 TO Max DO
nugget[a] := FALSE;
END;
FOR a := 0 TO Max BY 6 DO
FOR b := a TO Max BY 9 DO
FOR c := b TO Max BY 20 DO
nugget[c] := TRUE;
END;
END;
END;
a := 100;
REPEAT DEC(a); UNTIL NOT nugget[a];
WriteString("Maximum non-McNuggets number: ");
WriteCard(a, 2);
WriteLn();
END McNuggets.