RosettaCodeData/Task/Loops-Break/Smalltalk/loops-break-2.st

8 lines
217 B
Smalltalk
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
[:exit |
|first|
Stdout printCR: (first := Random nextIntegerBetween:0 and:19).
first == 10 ifTrue:[ exit value:nil ].
Stdout print:' '; printCR: (Random nextIntegerBetween:0 and:19).
] loopWithExit.