# #include #include #include #include #include #define spade 06#define

#include #include #include

We Will Write a Custom Essay Specifically
For You For Only \$13.90/page!

order now

“);            printf(“Enter 2 to See a Complete Listing of Rules.”);            printf(“Enter 3 to Exit Game. (Not Recommended)”);            printf(“Choice: “);            scanf(“%d”, & choice_2);            if(( choice_2<1) || ( choice_2>3))            {                printf(“Incorrect Choice. Please enter 1, 2 or 3”);                scanf(“%d”, & choice_2);            }            switch( choice_2)            {                case 1:                   system(“cls”);                   play();                   break;                case 2:                   system(“cls”);                   rules();                   break;                case 3:                   printf(” HAVE A GREAT DAY.

“);                   printf(“Have an almost perfect day!”);                   system(“pause”);                   exit(0);                   break;                default:                   printf(“Invalid Input”);            }    }    else if((choice_1 == ‘N’) || (choice_1 == ‘n’)) // If no, exit program    {        printf(“Your day could have been perfect.”);        printf(“Have an almost perfect day!”);        system(“pause”);        exit(0);    }    return;}void rules(){     char choice_1;     int   choice_2;     printf(”           RULES OF BLACKJACK”);     printf(”          —————————“);     printf(“I.”);     printf(”       Ought not scrutinize the chances of this GAME .”);     printf(”      %c This program produces cards indiscriminately “, spade);     printf(”      %c On the off chance that you continue losing, you are exceptionally unfortunate “, diamond);     printf(“II.

“);     printf(”     Each card has a value.”);     printf(”      %c Number cards 1 to 10 hold an estimation of their number..”, spade);     printf(”      %c  J, Q, and K cards hold an estimation of 10.”, diamond);     printf(”      %c Ace cards hold a value of 11″, club);     printf(”     The objective of this GAME is to achieve a card esteem aggregate of 21.”);     printf(“III.”);     printf(”     After the managing of the initial two cards, YOU should choose whether to HIT or STAY.”);     printf(”      %c taying will guard you, hitting will include a card”, spade);     printf(”     Because you are competing against the dealer, you must beat his hand.

“);     printf(”     BUT BEWARE!.”);     printf(”      %c If your total goes over 21, you will LOSE!.”, diamond);     printf(”     But the world is not over, because you can always play again.”);     printf(“%c%c%c YOUR RESULTS ARE RECORDED AND FOUND IN SAME FOLDER AS PROGRAM %c%c%c”, spade, heart, club, club, heart, spade);     printf(“Would you like to go the previous screen? (I will not take NO for an answer)”);     printf(”                  (Y/N)                    “);     scanf(“%c”,&choice_1);     while((choice_1!=’Y’) && (choice_1!=’y’) && (choice_1!=’N’) && (choice_1!=’n’))    {        printf(“”);        printf(“INVALID Choice. Please Enter Y for Yes or N for No.