Hourglass puzzle: Difference between revisions

Added 11l
(Hourglass puzzle en FreeBASIC)
(Added 11l)
Line 11:
<br><br>
 
 
=={{header|11l}}==
{{trans|Python}}
 
<lang 11l>V t4 = 0
L t4 < 10'000
V t7_left = 7 - t4 % 7
I t7_left == 9 - 4
print(|‘Turn over both hour glasses at the same time and continue flipping them each
when they individually run down until the 4 hour glass is flipped #. times,
wherupon the 7 hour glass is immediately placed on its side with #. hours
of sand in it.
You can measure 9 hours by flipping the 4 hour glass once, then
flipping the remaining sand in the 7 hour glass when the 4 hour glass ends.
’.format(t4 I/ 4, t7_left))
L.break
t4 += 4
L.was_no_break
print(‘Not found’)</lang>
 
{{out}}
<pre>
Turn over both hour glasses at the same time and continue flipping them each
when they individually run down until the 4 hour glass is flipped 4 times,
wherupon the 7 hour glass is immediately placed on its side with 5 hours
of sand in it.
You can measure 9 hours by flipping the 4 hour glass once, then
flipping the remaining sand in the 7 hour glass when the 4 hour glass ends.
 
</pre>
 
=={{header|FreeBASIC}}==
Line 51 ⟶ 81:
el reloj de 4 minutos.
</pre>
 
 
=={{header|Go}}==
1,481

edits