dizar mejzini

dizar mejzini

  • NA
  • 4
  • 1.8k

random numbers in c

Mar 3 2015 3:19 PM
I need a C program to simulate a card game. Assume that only 3, 4, 5, 6, and 7 playing cards are available. Player wants to two cards from the dealer (Prompt the cards). Program generates randomly the cards. The cards must store different variables. Then, write the playCard function that receives two cards as in integer type and returns 0 for losing and 1 winning. playCard function considers the sum of two cards and if the sum less than 10, the player wins. Otherwise, player loses. The results of the game must be given in the main function.
how i have to do this ?

Answers (1)