#include #include using namespace std; #include "dice.h" string RandomString() // post: returns one of four strings at random { Dice d(4); int roll = d.Roll(); if (1 == roll) { return "orange"; } else if (2 == roll) { return "lime"; } else if (3 == roll) { return "lemon"; } else { return "cherry"; } } void DoSlots(int spinCount) // post: prints spinCount lines, each line // has three random strings printed { int k; for(k=0; k < spinCount; k++) { cout << RandomString() << " "; cout << RandomString() << " "; cout << RandomString() << endl; } } int main() { DoSlots(7); return 0; }