McNuggets problem: Difference between revisions

Add Draco
(→‎{{header|R}}: Mostly syntax improvements.)
(Add Draco)
Line 619:
 
<pre>Largest non-McNuggets number: 43.</pre>
 
=={{header|Draco}}==
<lang draco>proc nonrec main() void:
byte LIMIT = 100;
[LIMIT+1] bool nugget;
byte a, b, c;
 
for a from 0 upto LIMIT do
nugget[a] := false
od;
 
for a from 0 by 6 upto LIMIT do
for b from a by 9 upto LIMIT do
for c from b by 20 upto LIMIT do
nugget[c] := true
od
od
od;
 
a := LIMIT;
while nugget[a] do a := a - 1 od;
writeln("Maximum non-McNuggets number: ", a)
corp</lang>
{{out}}
<pre>Maximum non-McNuggets number: 43</pre>
 
=={{header|Dyalect}}==
2,114

edits