Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- void PrintIntro();
- string GetGuess();
- int main() {
- PrintIntro();
- string Guess = "";
- GetGuess();
- //repeat guess back to player
- cout << endl;
- cout << "Your guess was: " << Guess << endl;
- return 0;
- }
- void PrintIntro() {
- //intruduce the player to the game
- constexpr int WORD_LENGHT = 5;
- cout << "Welcome to Bulls and Cows,a fun word game \n";
- cout << "Can you guess the " << WORD_LENGHT << " letter isogram?\n";
- cout << endl;
- cout << "Input your guess: ";
- return;
- }
- string GetGuess() {
- //get guess from player
- string Guess = "";
- getline(cin, Guess);
- return Guess;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement