1. ## blackjack code

I'm making a blackjack game where the dealer stops drawing cards once they've reached 17. However, i'm unable to get it to compile.

Code:
```#include <stdio.h>#include <stdlib.h>
#include <time.h>

#define HIGH 11

int main( ) {
int playerCard1, playerCard2, playerCard3, playerCard4, playerCard5, dealercard1, dealercard2, dealercard3, playersum, dealersum,num;
srand(time(NULL));
printf("Let's play blackjack!\n");
playerCard1 = rand( ) % HIGH + 1;
playerCard2 = rand( ) % HIGH + 1;
playersum= playerCard1 + playerCard2;
dealercard1 = rand( ) % HIGH + 1;
dealercard2 = rand( ) % HIGH + 1;
if(playersum>21)
printf("Your cards are: 11 11 = 22 OVER! You Lose!");
else
printf("Your cards are: %d and %d = %d\n", playerCard1,playerCard2,playersum);
printf("Dealer cards are: ? and %d\n", dealercard2);
printf("Do you want another card? 1=(YES) 0=(NO):");
scanf("%d",&num);
fflush(stdin);
while (playersum<=21&&num!=0)
{

switch (num)
{

case 1:
{

playerCard3 = rand( ) % HIGH + 1;
playersum=playerCard1 + playerCard2 + playerCard3;
printf("Your cards are: %d %d and %d =%d\n", playerCard1,playerCard2,playerCard3,playersum);
if(playersum>21)
printf("Sorry you went OVER 21! You Lose!");
return 0;
printf("Do you want another card? 1=(YES) 0=(NO):");
scanf("%d",&num);
fflush(stdin);

switch (num)
{
case 1:
{
playerCard4 = rand( ) % HIGH + 1;
playersum=playerCard1 + playerCard2 + playerCard3 + playerCard4;
printf("Your cards are: %d %d %d and %d=%d\n",playerCard1,playerCard2,playerCard3,playerCard4,playersum);
if(playersum>21)
printf("Sorry you went OVER 21! You Lose!");
return 0;
printf("Do you want another card? 1=(YES) 0=(NO):");
scanf("%d",&num);
fflush(stdin);
switch (num)
{
case 1:
{

playerCard5=rand( ) % HIGH + 1;
playersum=playerCard1 + playerCard2 + playerCard3 + playerCard4 + playerCard5;
if(playersum>21)
printf("Sorry you went OVER 21! You Lose!");
return 0;
}}}}}}

printf("Dealer cards are: %d and %d\n", dealercard1, dealercard2);

do {
dealercard3 =  rand( ) % HIGH + 1;
dealersum+=dealercard3;
printf("%d\n", dealercard3);
}while (dealersum<17);

if(playersum>dealersum)
printf("Dealer's Cards are %d\n",dealersum);
printf("Player has %d and Dealer has %d...You WIN!!!\n",playersum, dealersum);
if(dealersum>playersum)
printf("Dealer's Cards are %d\n",dealersum);
printf("Player has %d and Dealer has %d....You LOSE!!!",playersum,dealersum);
if(dealersum>21)
printf("Dealer's Cards are %d",dealersum);
printf("Dealer is over 21....YOU WIN!");

getchar();
return 0;

}
}```

2. After some reformatting to make it readable it compiles with no problems for me, although it is a bit of a mess code wise the compiler produces 0 errors 0 warning in 0 minutes and 0 seconds..

3. Just a side note:

If it's working on taazz's software and not on yours, then perhaps
it's something a bit more logical. What errors or warnings is the compiler
giving you? It could be the standard of C used and the compiler installed
for translation.