int C(int N, int K) // --------------------------------------------------- // Computes the number of groups of K out of N things. // Precondition: N and K are nonnegative integers. // Postcondition: Returns C(N, K). // --------------------------------------------------- { if ( (K == 0) || (K == N) ) return 1; else if (K > N) return 0; else return C(N-1, K-1) + C(N-1, K); } // end C