Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream> //Standard output stream for cin and cout
- #include <time.h> //Header file that contains definitions of functions to get and manipulate date and time information
- using namespace std; //Namespace for std, used for cin and cout
- int &chooseWinningDoorRandomly() { //This function does not accept parameters and will use the random number generator to choose a winning door for the game, between 1 and 3
- // Seed random number generator
- srand(time(NULL));
- int winningDoor = rand() % 3 + 1;
- return winningDoor;
- }
- int didUserChooseTheCorrectDoor(int usersChosenDoor, chooseWinningDoorRandomly()) {
- int z = 0;
- return z;
- }
- /*******************************************************************************
- * Function Name: main()
- * Parameters: none
- * Return Value: int
- * Purpose:
- *******************************************************************************/
- int main() {
- //Declare Variable(s)
- int usersChosenDoor;
- cout << "Welcome to the \"Monty Hall Problem\" game! Here we have 3 boxes, one box has \nONE MILLION DOLLARS inside! The other two boxes have contain a GOAT!\n\n";
- cout << "In which box do you think contains the ONE MILLION DOLLARS?\nBox Number One?\nBox Number Two?\nor Box Number Three?\n";
- cin >> usersChosenDoor;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement