Anonymous user
Stair-climbing puzzle: Difference between revisions
→{{header|Ruby}}
m (Added the Sidef language) |
|||
Line 889:
<lang rexx>step_up: do while \step(); call step_up; end
return</lang>
={{header|Run BASIC}}==
<lang runbasic>
result = stepUp()
Function stepUp()
While Not(stepp())
result = stepUp()
Wend
End Function
Function stepp()
stepp = int((Rnd(1) * 2))
print "Robot stepped "+word$("up down",stepp+1)
End Function
</lang>
=={{header|Ruby}}==
|