Question: c programming: The main shall ask the user for the number of players in the range of 1-5. The main shall ask the user how

c programming: The main shall ask the user for the number of players in the range of 1-5. The main shall ask the user how many cards are to be dealt to each player, not to exceed the size of one deck of cards being dealt. The main shall call a function with the number of players and the number of cards, named dealCards. The main shall call a function displayHands to show the cards dealt to each player. The main shall seed the random number generator. The function dealCards shall randomly deal cards to the players by calling a function called dealACard. No card shall be dealt twice. If the card has already been dealt(assigned to a player) then dealACard shall be called repeatedly until an unused card is dealt. The function dealACard shall use rand to select a random card from the deck. The function displayHands shall display the cards for each player in columns for each player, and rows of cards in each players hand.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!