Skip to content

Instantly share code, notes, and snippets.

Created December 19, 2016 20:52
Show Gist options
  • Save anonymous/7db2877a60ae61a308ddcdde9d818e36 to your computer and use it in GitHub Desktop.
Save anonymous/7db2877a60ae61a308ddcdde9d818e36 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <string>
using namespace std;
void PrintIntro();
// the entry point of our application
int main(int number)
{
PrintIntro();
//get a guess from the player
cout << "Enter your guess: ";
string Guess = "";
cin >> Guess;
getline(cin, Guess);
//repeat the guess back to them
cout << "Your guess was:" << Guess << endl;
//get a guess from the player
cout << "Enter your guess ";
getline(cin, Guess);
//repeat the guess back to them
cout << "Your guess was:" << Guess << endl;
cout << endl;
return 0;
}
void PrintIntro() {
//introduce the game
constexpr int WORLD_LENGHT = 5;
cout << "welcome to Bull And Cows, a fun word game\n";
cout << "can you guess the " << WORLD_LENGHT;
cout << " letter Isogram I'm thinking of?\n";
cout << endl;
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment