I am trying to solve for the total number of combinations of 3 separate parts. No part can be used more than once and each part must go within its own set of parts.
For example part A has 3 parts to choose from. Part B has 9 parts to choose from, and part C has 18 parts to choose from. I would think factorials would be the way to go about this, but I don't know how to combine them together to make a total list of combinations.
So my idea is:
int a = 3;
int b = 9;
int c = 18;
int d;
d = (a!/(a-1)!) * (b!/(b-1)!) * (c!/(c-1)!)
Would that be enough? I can't help but think that is way too easy, and can't help but think I am missing a step.
int a = 3;and such? Just use normal everyday language... it looks weird and unnecessary to write as you did. At least you didn't go so far as to declare a main method... – JMoravitz May 19 '21 at 14:23