Answer to Question #190585 in C++ for Eric

Question #190585

Final Project - Dance Recital Optimization Algorithm

CSC213

The Assignment

Your job is to create a ​program​ to implement an ​algorithm​ that makes scheduling of the dance recital easier for the dance studio.

The Data

The dance studio has 10 classes, and therefor 10 dances in the recital. Each class has 7 students. See the attached class listing, with students ID numbers listed for each class. To determine the possible arrangements of classes in the recital, we are using a mathematical technique called ​permutations​. Permutations tell us how many different ways a set can be arranged, when order matters. Think of a locker combination that has a 4 digit code. Of 10 numbers (0 through 9), you choose 4 numbers to make the code, and the order of those numbers matters.

For our dance recital we have 10 classes, and we are choosing 10 classes. Similar concept to the above, but think of a locker combination with 10 digits. An example of our dance recital ordering may look like the following



1
Expert's answer
2021-05-08T04:23:39-0400
#include <iostream>
 
using namespace std;
 
int fact(int x);
 
int main()
{
	int numberOfClasse = 10;
	int permutations = fact(numberOfClasse);
	cout << fixed;
	cout << "Possible arrangements of classes in the recital is: " << permutations << endl;
	return 0;
}
 
int fact(int x)
{
	int result = 1;
	for (int i = 1; i <= x; i++)
	{
		result *= i;
	}
	return result;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS