McNuggets problem: Difference between revisions
Content added Content deleted
m (→{{header|Wren}}: Changed to Wren S/H) |
Not a robot (talk | contribs) (Add ABC) |
||
Line 77: | Line 77: | ||
{{out}} |
{{out}} |
||
<pre>43</pre> |
<pre>43</pre> |
||
=={{header|ABC}}== |
|||
<syntaxhighlight lang="abc">PUT {1..100} IN non.nuggets |
|||
PUT 0 IN a |
|||
WHILE a <= 100: |
|||
PUT a IN b |
|||
WHILE b <= 100: |
|||
PUT b IN c |
|||
WHILE c <= 100: |
|||
IF c in non.nuggets: |
|||
REMOVE c FROM non.nuggets |
|||
PUT c+20 IN c |
|||
PUT b+9 IN b |
|||
PUT a+6 IN a |
|||
WRITE "Maximum non-McNuggets number:", max non.nuggets/</syntaxhighlight> |
|||
{{out}} |
|||
<pre>Maximum non-McNuggets number: 43</pre> |
|||
=={{header|Action!}}== |
=={{header|Action!}}== |
||
<syntaxhighlight lang="action!">PROC Main() |
<syntaxhighlight lang="action!">PROC Main() |