Question
I wrote this code and I have something screwed up and can't seem to get it right. it is supposed to be a simple program that gives a hand of cards and asks the user if they want another card or not at which point it will add another card to the previous onces and prompt the use again until they decline.
Let me know if you can fix my issues!
I put it on this programming website:
http://ideone.com/dU7jRh
Thanks!
Explanation / Answer
long back v wrote this for blackjack which is on similar lines to your question hoping this serves your purpose All the best #include #include #include using namespace std; //prototypes... void play21(void); int dealCards(int, string); void hit(int &); void determineWinner(int, int); int Random(int, int); void main(){ char keepPlaying = 'n'; //loop control variable do { play21(); //keep playing? cout > keepPlaying; } while(keepPlaying == 'Y' || keepPlaying == 'y'); } void play21(void){ //play one hand of 21 //randomize the cards srand((int) time(0)); // deal the cards int person = dealCards(2, "Your Cards:"); cout