Stair-climbing puzzle: Difference between revisions
Content added Content deleted
m (Added the Sidef language) |
|||
Line 889: | Line 889: | ||
<lang rexx>step_up: do while \step(); call step_up; end |
<lang rexx>step_up: do while \step(); call step_up; end |
||
return</lang> |
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}}== |
=={{header|Ruby}}== |