#include
#include
using namespace std;
void PrintIntro();
string GetGuessAndPrintBack();
// the entry point for our application
int main()
{
PrintIntro();
constexpr int NUMBER_OF_TURNS =5;
for (int count =1; count <= NUMBER_OF_TURNS;count++)
{
GetGuessAndPrintBack();
}
cout << endl;
return 0;
}
// introduce the game
void PrintIntro() {
constexpr int WORLD_LENGTH = 9;
cout << “Welcome to Bulls and Cows, a fun word game.\n”;
cout << “Can you guess the " << WORLD_LENGTH;
cout << " letter isogram I’m thinking of?\n”;
cout << endl;
return;
}
// get a guess from the player
string GetGuessAndPrintBack() {
cout << "Enter your guess: ";
string Guess = “”;
getline(cin, Guess);
// print the guess back
cout << "Your guess was: " << Guess << endl;
return Guess;
}
