Statistics › Moments ›
Permut
Calculates the number of permutations for a given set of data.
Controller: CodeCogs
Contents
Interface
C++
Permut
doublepermut( | int | n | |
int | k | ) |
Example 1
#include <codecogs/statistics/moments/permut.h> #include <iostream> int main() { double per = Stats::Moments::permut(6, 2); std::cout << "The number of permutations is: " << per<< std::endl; return 0; }
Output:The number of permutations is: 30
Parameters
n is an integer that describes the number of objects k is an integer that describes the number of objects in each permutation.
Returns
- the number of permutations for a given set of data
Authors
- Anca Filibiu (August 2005)
Source Code
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.