case 7:
if (die[0] == die[1] == die[2] || die[1] == die[2] == die[3] || die[2] == die[3] == die[4])
{
threeKind = (die[0]+die[1]+die[2]+die[3]+die[4]);
cout << "Your Three of a Kind score was " << threeKind << endl;
}
else
{
threeKind = 0;
cout << "Your Three of a Kind score was " << threeKind << endl;
}
break;
The problem is that this only seems to work for the very first part of code the die[0] == die[1] == die[2] section. Any time I get one of the other two matches it skips the if and goes straight to the else and gives a score of zero. Anyone got any idea what is going on here? I have tried everything I know and looked around for help, but I can't find what I need. Any help would be greatly appreciated!

New Topic/Question
Reply


MultiQuote




|