Homework Assignment #5
Due by 9:30AM, Tuesday, November 20th, 2001

Four friends are sitting at a table and decide to play a game of poker using a standard 52-card deck. In poker, each player gets dealt 5 cards, with Player #1 getting the 1st card, Player #2 getting the 2nd card, Player #3 getting the 3rd card, Player #4 getting the 4th card, Player #1 getting the 5th cards, etc. until a total of 20 cards are dealt.

Use the random number generator in a C program to simulate the dealing of these 20 cards to the 4 players. This assignment will focus on the use of user-defined functions, for loops, switch statements, and your ability to exactly match the format for printing the results as displayed below.

Example run:

Player 1        Player 2        Player 3        Player 4
 5 of Diamonds   A of Clubs      K of Spades    10 of Diamonds
10 of Spades     9 of Diamonds   J of Diamonds   7 of Diamonds
 J of Clubs     10 of Clubs      7 of Spades     5 of Clubs
 Q of Hearts     3 of Diamonds   A of Hearts     3 of Hearts
 9 of Spades     K of Diamonds   4 of Spades     K of Hearts


Paste the source code inside an e-mail message to hm305@nyu.edu and include HW5 in the Subject Line of the e-mail message.