// Playing blackjack anotherCard = 'y'; while( 'y' == anotherCard ) { // Deal another card cardFace = rand() % 13 + 1; // Add it to the user's hand - maximum 10 if( cardFace < 10 ) sumOfCards = sumOfCards + cardFace; else sumOfCards = sumOfCards + 10; cout << "The sum of your cards so far is " << sumOfCards << endl; // Ask whether the user wants another card cout << "Do you want another card dealt to you (y/n/)?" << endl; cin >> anotherCard; anotherCard = tolower( anotherCard ); }