f = @randperm;f(100, 30)
Standard input is empty
ans = Columns 1 through 13: 7 14 72 24 48 66 47 69 46 29 88 51 93 Columns 14 through 26: 91 71 37 25 95 4 75 100 26 82 18 68 64 Columns 27 through 30: 98 13 94 78
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!