//bridge.cpp #include using namespace std; const int hand=13; const int deckSize=52; int shuffle(int a[ ]) { srand(time(NULL)); for(int l=0; l38) { clubs = clubs + convertRank(a[n]); } else if ((a[n]>12) && (a[n]<26)) { hearts = hearts + convertRank(a[n]); } else if ((a[n]>25) && (a[n]<39)) { diamonds = diamonds + convertRank(a[n]); } } cout << "\nSpades: " << spades << endl; cout << "Hearts: " << hearts << endl; cout << "Clubs: " << clubs << endl; cout << "Diamonds: " << diamonds << endl; } int count(int a[ ]){ int total=0; for(int u=0; u x) && (w > y) && (w > z)){ cout << "Hand 1 is the winner!" << endl; } else if ((x > w) && (x > y) && (x > z)){ cout << "Hand 2 is the winner!" << endl; } else if ((y > w) && (y > w) && (y > z)){ cout << "Hand 3 is the winner!" << endl; } else if ((z > w) && (z > x) && (z > y)){ cout << "Hand 4 is the winner!" << endl; } else { cout << "There is no clear winner please try again" << endl; } } int main( ) { int hand1[hand], hand2[hand], hand3[hand], hand4[hand]; int hand1total=0, hand2total=0, hand3total=0, hand4total=0; int deck[deckSize] = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51 }; shuffle(deck); int q=0; for(int n=0;n