I tried this, but I think I am way off base:
Code:
#include <iostream>
#include <cstdlib>
#include <time.h>
using namespace std;
int rollDice();
int main(int argc, char* argv)
{
int numRolls;
int arrRolls[12];
int dieRoll;
srand((unsigned)time(0));
for (int k = 0; k < 12; k++)
{
arrRolls[k] = 0;
}
for (int i = 1; i <= numRolls; i++)
{
dieRoll = rollDice();
cout << "Die Roll " << i << ": " << dieRoll << endl;
arrRolls[dieRoll - 1]++;
}
for (int j = 0; j < 12; j++)
{
cout << "The number " << j + 1 << " was rolled " << arrRolls[j] << " times." << endl;
}
}
int rollDice()
{
int result;
result = (rand() % 12) + 1;
return result;
}