Lynix_

Bull/Cow Game C++ v1

May 18th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main(int number)
  7. {
  8.     //Introduce the game
  9.     constexpr int WordLength = 5;
  10.     cout << "Welcome to Bulls and Cows!" << endl;
  11.     cout << "Can you guess the word I'm thinking of?..  It's a ";
  12.     cout << WordLength;
  13.     cout << " letter word" << endl;
  14.     //get a guess from the player
  15.     cout << "Your guess: ";
  16.     string Guess;
  17.     cin >> Guess;
  18.     //repeat guess back to player
  19.     cout << "You guessed: ";
  20.     cout << Guess << endl;
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment