Guest User

Untitled

a guest
Apr 21st, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. do {
  2. printf("Do you want to (H)it or (S)tand?");
  3. scanf("%ch", &decision);
  4. tolower(decision);
  5. if (decision != 'h' && decision != 's') {
  6. printf("Pick 's' or 'h'. Try again.n");
  7. printf("Do you want to (H)it or (S)tand?");
  8. scanf("%ch", &decision);
  9. tolower(decision);
  10. }
  11. if (decision == 'h') {
  12. playershand = add_card_to_hand(&playershand, card);
  13. printf("Your cards:n");
  14. print_hand(playershand);
  15. playerscore = blackjack_value(playershand);
  16. printf("Score = %dn", playerscore);
  17. }
  18. if (decision == 's') {
  19. add_card_to_hand(&dealershand, card);
  20. print_hand(dealershand);
  21. }
Add Comment
Please, Sign In to add comment