RosettaCodeData/Task/Loops-Break/AWK/loops-break.awk

10 lines
136 B
Awk

BEGIN {
srand() # randomize the RNG
for (;;) {
print n = int(rand() * 20)
if (n == 10)
break
print int(rand() * 20)
}
}