Read five cards from the user. For each card, read the rank (1,2,3,4,5,6,7,8,9, 10,J,Q,K) and the suit (”spades”, ”hearts”, ”diamonds”, ”clubs”). Each of the five cards must be valid before accepting the next one. Once the program has the five cards, it should tell the user what is the best hand she has got, as per the following list (from best to worst):
igalna / pokerhands Goto Github PK
View Code? Open in Web Editor NEWRead five cards from the user. For each card, read the rank (1,2,3,4,5,6,7,8,9, 10,J,Q,K) and the suit (”spades”, ”hearts”, ”diamonds”, ”clubs”). Each of the five cards must be valid before accepting the next one. Once the program has the five cards, it should tell the user what is the best hand she has got, as per the following list (from best to worst):