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

Creat a blackjack game (in C program) using structs to represents the playing ca

ID: 3569338 • Letter: C

Question

Creat a blackjack game (in C program) using structs to represents the playing cards.

struct card

{ char*rank;

char*suit;

int value;

};

Make an array of 52 card structs and write a shuffle function. In main,deal two cards to the dealer and two cards to the player. Allow the player to get additional card (take a hit) until he/she stops or goes over 21 points (busts). Next, the dealer takes cards until he/she reaches 17 or busts. Finally, compare the two hands to see who has won-print congratulations. If tine permits, add code to allow betting and to play multiple times.

Explanation / Answer

#include #include using namespace std; typedef enum { VALUE, JACK, QUEEN, KING, ACE } FACE; typedef struct { int value; FACE f; } CARD; void print_card(CARD c) { if (c.f == ACE) cout