Advertisement
Guest User

Brandi Sumey - DealComputer()

a guest
Apr 24th, 2017
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. /* Unit 5 Case Study Fuction dealcomputer()
  2. Brandi Sumey 2017 */
  3.  
  4. #include <iostream>
  5. #include <string>
  6.  
  7. using namespace std;
  8.  
  9. void dealcomputer(int &total)
  10. {
  11. /*Generate three cards for the computer, total their value, and inform user of the cards and total
  12. Generates three cards, calculates their total, and informs the user of the cardes and their value
  13. */
  14.  
  15. int card1, card2, card3, card4;
  16. string name1, name2, name3;
  17.  
  18. card4 = 0;
  19.  
  20. drawcard(card1);
  21. namecard(card1, name1);
  22. Sleep(1000);
  23. drawcard(card2);
  24. namecard(card2, name2);
  25. Sleep(1000);
  26. drawcard(card3);
  27. namecard(card3, name3);
  28.  
  29. cardsum(card1, card2, card3, card4, total);
  30.  
  31. cout << endl << endl << "The computer's first card is a " << name1 << "." << endl;
  32. cout << "The computer's second card is a " << name2 << "." << endl;
  33. cout << "The computer's third card is a " << name3 << "." << endl;
  34. cout << "The computer's total is " << total << "." << endl;
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement