Tuesday, July 28, 2009

The number of permutations of a set of n items take r at a time is given by the formula:?

The number of permutations of a set of n items take r at a time is given by the formula:





n!__


r!(n-r)!


Where n! is the factorial of n. If there are 18 people in your class and you want to divide the class into programming teams of 3 members, you can compute the number of different teams that can be arranged using the above formula. Write a C++ program that determines the number of potential team arrangements. You will need to use the double type for this computation. Be sure to use proper formatting and appropriate comments in your code.





//************************************...


// Combination Calculator program


//************************************...





#include %26lt;iostream%26gt; // Access cout


#include %26lt;cmath%26gt; // Access power functions


#include %26lt;iomanip%26gt; // Access manipulators


using namespace std;





const float TOTAL_STUDENTS = 18 // Total amount of students


const float TEAM_SIZE = 3 // Size of team

The number of permutations of a set of n items take r at a time is given by the formula:?
Okay, where's the rest of your code, and what's your question?

online survey

No comments:

Post a Comment