I am supposed to write a program that scores a black jack hand. Th.docx - I am supposed to write a program that scores a black jack hand This is what I

I am supposed to write a program that scores a black jack hand. Th.docx

This preview shows page 1 - 5 out of 10 pages.

Image of page 1
Image of page 2
cin >> Number_of_Cards; while((Number_of_Cards < 2) || (Number_of_Cards > 5)) { cout << "How many cards do you have?"; cin >> Number_of_Cards; } for(int i=0; i < Number_of_Cards; i++) { cout << "\nPlease enter the value of the card. Use 2 - 9 for numeric cards." << "\nUse 'T' for 10, 'J' for Jack, 'Q' for queen, 'K' for King and " << "\n'A' for Ace" << i + 1 << ": "; if (i == 0) cin >> value1; else if (i == 1) cin >> value2; else if (i == 2) cin >> value3; else if (i == 3) cin >> value4; else if (i == 4) cin >> value5; } TotalValue = 0;
Image of page 3
Number_Of_Aces = 0; for(int i=0; i < Number_of_Cards; i++) { if (i == 0) tempValue = value1; else if (i == 1) tempValue = value2;
Image of page 4
Image of page 5

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture