text cover

Data Abstraction and Problem Solving with C++

Walls and Mirrors

by Frank M. Carrano

Addison Wesley Logo

c02p093.cpp File Reference


Detailed Description

Mr. Spock's Dilemma (Choosing k Out of n Things)

Date:
29 May 2006
Chapter:
Chapter 2
Page:
Page 93
Version:
5.0

Definition in file c02p093.cpp.

Go to the source code of this file.

Functions

int c (int n, int k)


Function Documentation

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:
None.
Parameters:
n The given number of things.
k The given number to choose.
Returns:
c(n, k).

Definition at line 22 of file c02p093.cpp.

Referenced by getValue().


Generated on Sun Aug 27 11:05:08 2006 for AWLogo by  doxygen 1.4.6