// sample C++ program for using random number generation #include #include #include #include using namespace std; int main() { int numSides = 6; unsigned int currentTime = (unsigned)time(0); //to set the random to the same sequence //unsigned int currentTime = 42; cout << "current time " << currentTime << endl; srand(currentTime); //seed the random number generator for (int i = 0; i < 10; i++) { long die1 = (rand() % numSides) + 1; long die2 = (rand() % numSides) + 1; cout << die1 << " + " << die2 << " = " << die1+die2 <