McNuggets problem: Difference between revisions

m
→‎{{header|ALGOL 68}}: Use the simplification in the BASIC, Comal, Draco, Dyalect etc. samples where the loop counters do the additions
(Add VTL-2)
m (→‎{{header|ALGOL 68}}: Use the simplification in the BASIC, Comal, Draco, Dyalect etc. samples where the loop counters do the additions)
Line 112:
FOR i FROM LWB sum TO UPB sum DO sum[ i ] := FALSE OD;
FOR x FROM 0 BY 6 TO max nuggets DO
FOR y FROM 0x BY 9 TO max nuggets DO
FOR z FROM 0y BY 20 TO max nuggets DO
INTsum[ nuggetsz ] := x + y + z;TRUE
IF nuggets <= max nuggets THEN sum[ nuggets ] := TRUE FI
OD # z #
OD # y #
3,028

edits