// BullCowGame.cpp : Defines the entry point for the console application.
//
#include “stdafx.h”
#include
#include
using namespace std;
void PrintIntro();
string GetGuessAndPrintBack();
int Main()
{
PrintIntro();
GetGuessAndPrintBack();
GetGuessAndPrintBack();
cout << endl;
return 0;
}
// introduce the game
void PrintIntro()
{
constexpr int WORD_LENGTH = 9;
cout << “Welcome to Bulls and Cows a pretty **** word game.\n”;
cout << “Can you guess the word i am thinking of?\n”;
cout << “The word is " << WORD_LENGTH;
cout << " characters long\n”;
cout << endl;
return;
}
string GetGuessAndPrintBack()
{
string Guess = “”;
cout << “Please input your guess:\0”;
getline(cin, Guess);
cout << “Your Guess was '” << Guess << “’.Is this your final answer?:” << endl;
return Guess;
}