JavaScript Factorial
JavaScript Factorial
Out of context: Reply #7
- Started
- Last post
- 7 Responses
- kingsteven0
You want to find out how many possible ways you can arrange 3 objects = 3! (exclamation is notation for the factorial) = 3x2x1 = 6
52 objects (ie. a deck of cards) = 52! = 80658175170943878571660636856403...
To find out the probability of any possible hand in 5 card draw = 5!*47!/52! = 2598960
- 'supkingsteven
- obvs you don't need to multiply by 1 and the second answer has been cropped, but you get the idea.kingsteven