Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. int main() {
  2.         int hand[HAND_SIZE];
  3.         readNumbers(hand);
  4.  
  5.         if (containsPair(hand)) {
  6.             cout << "Pair!" << endl;
  7.         }
  8.         if (containsTwoPair(hand)) {
  9.             cout << "Two Pair!" << endl;
  10.         }
  11.         if (containsThreeOfaKind(hand)) {
  12.             cout << "Three of a Kind!" << endl;
  13.         }
  14.         if (containsFullHouse(hand)) {
  15.             cout << "Full House!" << endl;
  16.         }
  17.         if (containsFourOfaKind(hand)) {
  18.             cout << "Four of a Kind!" << endl;
  19.         }
  20.         if (containsStraight(hand)) {
  21.             cout << "Straight!" << endl;
  22.         }
  23.         else {
  24.             cout << "High Card!" << endl;
  25.         }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement