#include 0; b < 52; b++) {

#include #include #include int shuff(int cards){ int s; int b; int desk52; for (b=0;b 21) { printf(“Total of player’s cards now:%d

“,rtotal); printf(“Opss! The Computer won the game!
“); return 1; } else if (rtotal == 21) { printf(“Total of player’s cards now:%d

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

order now

“,rtotal); printf(“Yahoo!! The Player won the game!
“); return 0; } } printf(“Total of player’s cards now:%d

“,rtotal); //whether player get different cards k=0; for (k=0; k 21) { printf(“Total of the player’s cards now:%d

“,rtotal); printf(“Opss! The Computer won the game!
“); return 1; } else if (rtotal == 21) { printf(“Total of player’s cards now:%d

“,rtotal); printf(“Yahoo!! The Player won the game!
“); return 0; } else printf(“Total of player’s cards now:%d

“,rtotal); } else { printf(“Total of player’s cards now:%d

“,rtotal); break; } } if (k == 3) { printf(“Player won the game ,Because the total of your 5 cards is no larger than 21! You’re So lucky!
“); return 0; } //the 2 cards of boss/computer //i=0; printf(“Computer’s cards:
“); pic(mcards0); pic(mcards1); if (mcards0%100 + mcards1%100 == 2) { mtotal=12; //two A cards printf(“Total of computer’s cards now:%d

“, mtotal); } else if ((convert_jkq(mcards0))%100 + (convert_jkq(mcards1))%100 ==1) { mtotal=21; printf(“Total of computer’s cards now:%d

“, mtotal); printf(“Opss! The Computer won the game!
“); return 1; } else if (mcards0%100==1 || mcards1%100==1) { mtotal=(mcards0+mcards1)%100+(rand()%2)*10; printf(“Total of computer’s cards now:%d

“, mtotal); } else { mtotal = (convert_jkq(mcards0))%100 + (convert_jkq(mcards1))%100; printf(“Total of computer’s cards now:%d

“, mtotal); } //whether computer get another cards until bsum>16 //i=0; for (k=0; k21 || rtotal>mtotal) { printf(“Yahoo!! The Player won the game!
“); return 0; } else if (rtotal == mtotal) { printf(“Oh no, player and the computer get the same result !
“); return 3; } else if (rtotal