Permutations & Combinations

Calculate permutations P(n,r) and combinations C(n,r) — the number of ways to arrange or select r items from a set of n. Also computes factorials.