0

I am trying to check if given poker rank is Straight or not with this code.what am I wrong?

https://code.sololearn.com/cDJ54YG5U99Z/?ref=app

9th Mar 2023, 5:11 AM
Killiam Chances
Killiam Chances - avatar
4 Respuestas
0
what is your input ?
9th Mar 2023, 7:36 PM
zemiak
0
All possible cards for Straight bro
10th Mar 2023, 2:57 AM
Killiam Chances
Killiam Chances - avatar
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++;
10th Mar 2023, 6:03 AM
zemiak
0
Oh,I see Many thanks for your help
10th Mar 2023, 7:13 AM
Killiam Chances
Killiam Chances - avatar