Hi, total beginner here, trying to learn at home.

Just thought i'd get that in.

if i have a number eg 123

trying to figure out a way of calculating all the possible cominations

123

132

213

231

312

321

can do it with pencil and paper but don't know where to start with program

can anyone help?