McNuggets problem: Difference between revisions

no edit summary
m (→‎{{header|ALGOL 68}}: Additional micro-tweak)
No edit summary
Line 791:
El mayor número que no sea McNugget es: 43
</pre>
 
 
 
 
=={{header|FutureBasic}}==
<lang futurebasic>
local fn McNuggetsProblem
BOOL l(100)
long a, b, c, i, n
for a = 0 to 100/6
for b = 0 to 100/9
for c = 0 to 100/20
n = a * 6 + b * 9 + c * 20
if n <= 100 then l(n) = YES
next
next
next
for i = 100 to 1 step -1
if l(i) == NO then print "The maximum non-McNuggets number less than 100 is: "; i: exit for
next
end fn
 
window 1,,( 0, 0, 450, 100 )
fn McNuggetsProblem
 
HandleEvents
</lang>
{{output}}
<pre>
The maximum non-McNuggets number less than 100 is: 43
</pre>
 
 
 
 
 
 
 
 
=={{header|Go}}==
723

edits