Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need help in this C++ hw. It requires the use of basic loops( no functions or ar

ID: 3664591 • Letter: N

Question

Need help in this C++ hw. It requires the use of basic loops( no functions or arrays). Need to write a simplet c++ program with loops to create a simple game of BLACKJACK. Appreciate the help.

QUETION: "Write a command line game that plays a simple version of blackjack. The program should generate a random number between 1 and 10 each time the player gets a card. Each of the values (1 through 10) must be equally likely. (In other words, this won't be like real black jack where getting a 10 is more likely than getting some other value, because in real black jack all face cards count as 10.) It should keep a running total of the players cards, and ask the player whether or not it should deal another card. Sample output for the game is written below. Your program should produce the same output."

Your steps might be something like this:

Generate a new card in each loop and display the value Update the total in each loop. Check to see if the user busts in each loop Wrap the game in loop that handles the Play-Again functionality

Sample would be :

Explanation / Answer

#include #include #include #include #include #include "highlow.h" using namespace std; void playGame(int& funds); string getCardSuit(int &cardnumber); string getCardFace(int &cardnumber); bool isBetween(int card1, int card2, int card3); int getBet(int funds, int bet); int funds, bet, cardnumber, card1, card2, card3; char ans; string card1details, card2details, card3details, suit; main() { int funds = 1000; cout ans; } while((ans == 'y')||(ans == 'Y')); if((ans == 'n') || (ans == 'N')) cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote