> From: John Randall
> The Mega Millions lottery requires picking 5 distinct numbers in the
> range 1-56 and one number in the range 1-46.

pick=: (5 1 (<@:>:@?) 56 46"_)"0

pick i.4
+-------------+--+
|55 16 8 15 50|33|
+-------------+--+
|9 4 1 18 20  |30|
+-------------+--+
|15 26 48 11 1|20|
+-------------+--+
|15 8 56 31 43|17|
+-------------+--+
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to