Question: how many combinations of 3 numbers out of 5?
Answer: We conclude that there are 35−3×25+3=150 combinations. If there were no restrictions, the number of five digit codes that could be formed with the digits 1, 2, 3 would be 35 since there are three ways to choose each of the five digits.