My Bulls and Cows "Guess" code

Hi! Here is my bulls and cows Guess entering code. Interesting how little things we take for granted like text formatting takes extra care to do.

#include <iostream>
#include <string>

using namespace std; //prevents having to type std:: before cout and other stuff

int main()
{
	// introduce the game
	constexpr int WORD_LENGTH = 5;
	cout << "Welcome to Bulls and Cows, a fun word game.\n";
	cout << "Can you guess the " << WORD_LENGTH; 
	cout << " letter isogram I'm thinking of?\n";
	
	// get a guess from the player
	string Guess = "";
	cout << "Please enter your guess: ";
	cin >> Guess;
	cout << "\n";
	cout << "Looks like you guessed '" << Guess << "'.\n";

	return 0;
}

Privacy & Terms