0
I am trying to check if given poker rank is Straight or not with this code.what am I wrong?
4 odpowiedzi
0
what is your input ?
0
All possible cards for Straight bro
0
i.e. this is ok becuase input is sorted
7C 6S 5S 4H 3H
but this no
7C 6S 5S 3H 4H
because in unsorted input
3 - 5 is not 1 and
5 - 3 is not 1
for (int o=1;o<5;o++){
if (v4[o] - v4[o-1] == 1) {
e++;
} else
if (v4[o-1] - v4[o] ==1) {
r++;
0
Oh,I see
Many thanks for your help