#include <iostream>#include <stdlib.h>usingnamespace std;
constint NUM_DICE = 5;
// If we have three of a kind, return sum of all dice.// If not three of a kind, return 0.int threeOfAKind(int rolls[NUM_DICE])
{
return0;
}
void rollDice(int rolls[NUM_DICE])
{
for(int i = 0; i < NUM_DICE; i++) {
rolls[i] = rand()%6+1;
}
}
void showDice(int rolls[NUM_DICE])
{
cout << "Your dice: ";
for(int i = 0; i < NUM_DICE; i++) {
cout << rolls[i] << " ";
}
cout << "\n";
}
int main()
{
srand(time(NULL)); // Initialize random number generatorint rolls[NUM_DICE];
for(int i = 0; i < 20; i++) {
rollDice(rolls);
showDice(rolls);
cout << "Score: " << threeOfAKind(rolls) << "\n";
}
return0;
}