Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.27 KB | None | 0 0
  1. #include <iostream>  //Standard output stream for cin and cout
  2. #include <time.h>    //Header file that contains definitions of functions to get and manipulate date and time information
  3. using namespace std; //Namespace for std, used for cin and cout
  4.  
  5. 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
  6.     // Seed random number generator
  7.     srand(time(NULL));
  8.     int winningDoor = rand() % 3 + 1;
  9.     return winningDoor;
  10. }
  11.  
  12. int didUserChooseTheCorrectDoor(int usersChosenDoor, chooseWinningDoorRandomly()) {
  13.     int z = 0;
  14.     return z;
  15. }
  16. /*******************************************************************************
  17. *  Function Name: main()
  18. *  Parameters: none
  19. *  Return Value: int
  20. *  Purpose:
  21. *******************************************************************************/
  22. int main() {
  23.    
  24.     //Declare Variable(s)
  25.     int usersChosenDoor;
  26.  
  27.     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";
  28.     cout << "In which box do you think contains the ONE MILLION DOLLARS?\nBox Number One?\nBox Number Two?\nor Box Number Three?\n";
  29.     cin >> usersChosenDoor;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement