Write a program to shuffle a deck of cards (52 cards, no jokers) and print the list of cards in the shuffled deck. Your program should have three functions: 1) shuffle the deck, 2) display the name of a card, and 3) return the point value of a card.
Level: 14; Subject: computer programming in C
void shuffle(int deck);
void displayCard(int card);
int getValue(int card);
printf("This is a card game?????.\n");
for(c = 0; c < 52; c++)
for(c = 0; c <= 12; c++)
c = 'diamonds'
can you specifu your problem in more detail??
if you will explain your problem with more details then we will be able to help
I have to just shuffle the cards, and then have the shuffled cards print their values. The face cards have a value of ten except aces,... all other cards are their numbers. But I have to have shuffle as a seperate function, displaying the name of the card as a function, and the point value of the card as a seperate function. the display is suppossed to turn out like Ace of Spades is card #XXXXX counts as 117 of Hearts is card #XXXXX counts as 7The card number is XXXXX where it is drawn in a shuffle.
when do you need the code??
as soon as possible. I am still trying some stuff but I don't think I am doing it right,.. I also have to use an array for the deck and this is really my first time using arrays. I just started programming about a month ago, I am very new.
ok what are you usibg ti suffle cards??
I was going to try to use srand(time(NULL));in the main function,.. I am not sure if I should put in the the shuffle function.
oki have started working on the code will post it when i am complete.....
Thank you very much!!
One more questionWhat compiler are you using to run the c codes??
Borland C++ 5.5 for Win32 Copyright (c) 1993, 2000 Borland
oki will keep posting update from my side and will try to post the code within 6 hrs.
UPDATE:I am done with the shuffle partCan you explain in little more detail what is to be done in 2nd and 3rd part??
OkI am done with the code......Download code from the below location using "FREE USER" OptionClick herePlease find the file attached with name "CARDS.cpp" which contains the required code.........
BE CS, 4+ Experience in Programming and Database (ERP)