Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Unit 5 Case Study Fuction dealcomputer()
- Brandi Sumey 2017 */
- #include <iostream>
- #include <string>
- using namespace std;
- void dealcomputer(int &total)
- {
- /*Generate three cards for the computer, total their value, and inform user of the cards and total
- Generates three cards, calculates their total, and informs the user of the cardes and their value
- */
- int card1, card2, card3, card4;
- string name1, name2, name3;
- card4 = 0;
- drawcard(card1);
- namecard(card1, name1);
- Sleep(1000);
- drawcard(card2);
- namecard(card2, name2);
- Sleep(1000);
- drawcard(card3);
- namecard(card3, name3);
- cardsum(card1, card2, card3, card4, total);
- cout << endl << endl << "The computer's first card is a " << name1 << "." << endl;
- cout << "The computer's second card is a " << name2 << "." << endl;
- cout << "The computer's third card is a " << name3 << "." << endl;
- cout << "The computer's total is " << total << "." << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement