#include
int main()
{
//
// Print welcome messages to terminal and start game.
//
std::cout << "You are FBI Agent Burt Macklin on a mission to track down and stop the evil spy April Ludgate,\n";
std::cout << "and you need to break into her computer in order to locate her next target. You will need to\n";
std::cout << "enter a code in order to unlock her computer.\n\n";
std::cout << "Bewarned the computer might be booby trapped...... so no mistakes!\n";
std::cout << std::endl << std::endl;
//
// Declare 3 number code.
//
const int CodeA = 4;
const int CodeB = 3;
const int CodeC = 2;
const int CodeSum = CodeA + CodeB + CodeC;
const int CodeProduct = CodeA * CodeB * CodeC;
//
// Print sum and product to terminal
//
std::cout << std::endl;
std::cout << "April is Crazy! There are 3 numbers in the code!" << std::endl;
std::cout << "She left you a note saying the code's numbers add up to: " << CodeSum <<std::endl;
std::cout << "Another message left for you, saying The code's numbers multiply to give: " << CodeProduct << std::endl;
int PlayerGuessA, PlayerGuessB, PlayerGuessC;
std::cout << "Please enter your guess: \n";
std::cin >> PlayerGuessA;
std::cin >> PlayerGuessB;
std::cin >> PlayerGuessC;
std::cout << "You guessed: " << PlayerGuessA << PlayerGuessB << PlayerGuessC << std::endl;
int GuessSum = PlayerGuessA + PlayerGuessB + PlayerGuessC;
int GuessProduct = PlayerGuessA * PlayerGuessB * PlayerGuessC;
if(GuessSum == CodeSum && GuessProduct == CodeProduct)
{
std::cout << "You did it Burt Macklin! April's computer is unlocked and you were able to locate and save Lil'Sebatian!!!!";
}
else
{
std::cout << "BOOM!!!!!!!!!\nApril's desk exploded a glitter bomb all over you!\nOh no! They're going to have to clean you up for weeks!";
}
return 0;
}