this is my code for this section
#include <iostream>
#include <string>
using namespace std;
void printIntro()
{
constexpr int WORD_LENGHT = 9;
// introduce the game and staff
cout << "Welcom to bulls and cows " << endl;
cout << "Can you guess the " << WORD_LENGHT;
cout << " I'm thinking of ?" << endl;
return;
}
string getGuess()
{
// get a guess from the player
string Guess = "";
cout << "enter your guess: ";
getline(cin, Guess);
return Guess;
}
void printGuess(string Guess)
{
// Repeat the guess back
cout << endl << "your guess " << Guess << endl;
}
void PlayGame()
{
constexpr int NUMBER_OF_TURNS = 5;
// loop for the number of turns asing for guesses
for (int i = 1; i <= NUMBER_OF_TURNS; i++)
{
printGuess(getGuess());
}
}
// the entry point of the app
int main()
{
printIntro();
PlayGame();
getchar();
return 0;
}