Question: coding in c++ please; Write a program that simulates the action of picking a card from a deck of 52 cards. Your program displays the

coding in c++ please;

Write a program that simulates the action of picking a card from a deck of 52 cards. Your program displays the suit and rank of the card. Hint: Consider the cards are random numbers from 0 to 51. Card numbers 0 to 12, 13 to 25, 26 to 38, and 39 to 51 represent 13 Spades, 13 Hearts, 13 Diamonds, and 13 Clubs, respectively. cardNumber / 13 determines the suit of the card and cardNumber % 13 determines the rank of the card. Obtain a random number from 0 to 51 and display its rank and suit.

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!