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

10 lines
136 B
Awk
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
BEGIN {
srand() # randomize the RNG
for (;;) {
print n = int(rand() * 20)
if (n == 10)
break
print int(rand() * 20)
}
}