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