Calculate nPr (permutations) and nCr (combinations) for any n and r.
nPr = n!/(n-r)! (order matters). nCr = n!/(r!(n-r)!) (order doesn't matter).