[3] | | R [1] == R [4])
{<<" n nYou got a pair!" <
}
{<<" n n No pair" <
}
// 2) Перевірте на 2 пари
if (R [i] == R [1])
{if (R [3] == R [4])
{cout <<"You got a two pairs!" <
}
} (R [2] == R [1])
{if (R [3] == R [4])
{cout <<"You got a two pairs!" <
}
} (R [0] == R [1])
{if (R [3] == R [2])
{cout <<"You got a two pairs!" <
}
}
{<<"No two pairs" <
}
// 3) Перевірити трійку
if (R [0] == R [1] && R [1] == R [2] | | R [1] == R [2] && R [2] == R [3] | | R [2] == R [3] && R [2] == R [4])
{<<"You got a three of a kind!" <
}
{<<"No three of a kind" <
}
// 4) Перевірити стріт:
if (R [1] == R [0] +1 && R [2] == R [1] +1 && R [3] == R [ 2] +1 && R [4] == R [3] +1)
{<<"You got a straight!" <
}
{<<"No straight" <
}
// 5) Перевірте флеш
if (S [0] == S [1] && S [1] == S [2] && S [2] == S [3] & & S [3] == S [4])
{<<"You got a flush!" <
}
{<<"No flush" <
}
// 6) Перевірте фул хаус
if (R [0] == R [1] && R [1] == R [2] && R [3] == R [4] | | R [2] == R [3] && R [2] == R [4] && R [0] == R [1])
{<<"You got Full House!" <
}
{<<"No Full House" <
}
// 7) каре
if (R [0] == R [1] && R [1] == R [2] && R [1] == R [3] | | R [1] == R [2] && R [2] == R [3] && R [2] == R [4])
{<<"You got four of a kind!" <
}
{<<"No four of a kind" <
}
//8) Перевірте, стріт-флеш (R [1] == R [0] +1 && R [2] == R [1] +1 && R [3] == R [2] +1 && R [4] == R [3] +1 & & S [0] == S [1] && S [1] == S [2] && S [2] == S [3] && S [3] == S [4])
{<<"You got a flush-straight!" <
}
{<<"No flush...