Hi, I am taking a intro to C++ course so my knowledge base only limits to areas such as if/else, functions, and recursions.

We are creating a program which will determine the probability of Poker Hands, such as Royal Flush, Straight Flush, Four of a Kind and such. However in order to complete this, I need to determine how many different poker hands there are. On pencil and paper, this is relatively easy as its a simple combination problem.

52! / 5! 47!

52 represents the deck, 5 represents the hand, and 47 represent the Deck-Hand. The total amount of poker hands are 2,598960.

The problem is that I cant seem to implement this into my program. I cannot simply pull a random number such as 2,598960 out of thin air. I must prove it within the confines of my program with the use of combinations. Thus far, I have attempted to use a recursion for the numerator and denominator. This is not successful as 50! well exceeds the any type of data type.

In real life, there is a cancellation for simplicity which results to 52x51x50x49x48/5x4x3x2x1. This would be much easier for the program to calculate. However I doubt there is a way for the program to perform cancellations.

In general, I am having a hard time initializing this program simply because I dont know how to force the program to perform such calculations. Any help is appreciated.