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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started