xref: /aosp_15_r20/external/one-true-awk/testdir/p.48b (revision 9a7741de182b2776d7b30d6355f2585c0780a51b)
1*9a7741deSElliott HughesBEGIN	{ k = 3; n = 10 }
2*9a7741deSElliott Hughes{	if (n <= 0) exit
3*9a7741deSElliott Hughes	if (rand() <= k/n) { print; k-- }
4*9a7741deSElliott Hughes	n--
5*9a7741deSElliott Hughes}
6