how many sets of 3 in 4 code example Example: how many sets of 3 in 4 nCr = n!/(r!(n-r)!) 4C3 = 4!/(3!(4-3)!) = 24/(6*1) = 4