#include <iostream>
void PrintIntorodtion() {
std::cout << "You are a secret agent breaking into a secure server room\n";
std::cout << "You need to enter the correct codes to continue...\n\n";
}
void AsciiArt() {
std::cout << "Art by Susie Oviatt\n\n";
std::cout << "{}" << std::endl;
std::cout << "||" << std::endl;
std::cout << "|| .,,;;;;;;,,.." << std::endl;
std::cout << "||.;;;;;;*;;;;;;;*;;, ..,,;;;;;;%%%%%," << std::endl;
std::cout << "||.;;;;;;*;;;;;;;*;;, ..,,;;;;;;%%%%%," << std::endl;
std::cout << "||';*;;;;;;;;*;;;;;;,::*::;;;*;;%%%%%%>>%%%%%, .;" << std::endl;
std::cout << "|| ';;;;;*;;;;;;;;*;;,:::::*;;;;;@@@##>>%%%%%%, ..,,;%%%%'" << std::endl;
std::cout << "|| ;*;;;;;;;;*;;;;;;,::*;:;;;;*;@@@@##ooO0@@##>>%%%%%%%%%%%%%%'" << std::endl;
std::cout << "|| ;;;;;;*;;;;;;;;*;;,:;:::*;;;;%%%%%%ooO0@@##>>%%%%%%%%%%a@@'" << std::endl;
std::cout << "|| ;;*;;;;;;;;;*;;;;;,::*;::;;;*;%%%%%%>>%%%%%%ooO@@@@@@@@@@@" << std::endl;
std::cout << "|| ;;;;;;*;;;;;;;;*;;,:::::;*;;;;@@@@##>>%%%%%%%ooO@@@@@@@@%%" << std::endl;
std::cout << "|| ;;*;;;;;;;;;*;;;;;;,::*;:;;;*;@@@@@##ooO0@@##>>%%%%%%%%%%%" << std::endl;
std::cout << "|| ;;;;;;;*;;;;;;;*;;;,:::::*;;;;;%%%%%%ooO0@@@##>>%%%%%%%%a@," << std::endl;
std::cout << "|| ;;;*;;;;;;;;*;;;;;;,::*:;;;;;*;%%%%%%%>>%%%%%%%%ooO@@@@@@@@" << std::endl;
std::cout << "|| ;;;;;;;*;;;;;;;;*;;;,::::;*;;;;@@@@@##>>%%%%%%%%%ooO@@@@@%%'" << std::endl;
std::cout << "|| ;;*;;;;;;;;*;;;;;;;;,::*:;;;:;*;@@@@@##ooO0@@@@##>>%%%%%%%%" << std::endl;
std::cout << "|| ;;;;;;;*;;;;;;*;;;;*;,::::;*;;;;;%%%%%%ooO00@@@@##>>%%%%%a@" << std::endl;
std::cout << "|| ;*;;a@@@#######@@@@@a,:::*;;;;;;*;%%%%%%>>%%%%%%%%%ooO@@@@@," << std::endl;
std::cout << "|| ;;@@@@@@#######@@@@@##ooO00@@@@@@@@@@@##>>%%%%%%%%%%ooO@@@%%" << std::endl;
std::cout << "|| a@@@%%%%%%%%%%%%%%%%%%ooO00@@@@@@@@@@@@##ooO0@@@@##>>%%%%%%%" << std::endl;
std::cout << "|| @@%%%%%%%%%%%%%%%%%%%%%>>%%%%%%%%%%%%%%%%ooO00@@@@##>>%%%a@@" << std::endl;
std::cout << "|| %%%%a@@##########@@@@##>>%%%%%%%%%%%%%%%%%>>%%%%%%%%%ooO@@@a" << std::endl;
std::cout << "|| %%@@@@@##########@@@@@##ooO0@@@@@@@@@@@@##>>%%%%%%%%%%ooO@%%" << std::endl;
std::cout << "|| a@@@%%%%%%%%%%%%%%%%%%%%ooO0@@@@@@@@@@@@@##ooO0@@@@##>>%%%%%." << std::endl;
std::cout << "|| @@%%%%%%%%%%%%%%%%%%%%%%%>>%%%%%%%%%%%%%%%%ooO0@@@@@##>>%%%a@" << std::endl;
std::cout << "|| %%%%a@@############@@@@##>>%%%%%%%%%%%%%%%%%>>%%%%%%%%%%ooO@@a" << std::endl;
std::cout << "|| %%@@@@@############@@@@@##ooO0@@@@@@@@@@@@##>>%%%%%%%%%%%ooO%%" << std::endl;
std::cout << "|| a@@@%%%%%%%%%%%%%%%%%%%%%%ooO0@@@@@@@@@@@@@##ooO0@@@@##%>>%%%%" << std::endl;
std::cout << "|| @@%%%%%%%%%%%%%%%%%%%%%%%%%>>%%%%%%%%%%%%%%%%ooO0@@@@@##>>%%a@" << std::endl;
std::cout << "|| .%%%' `>%%%%%%%%%%%%%%%%>>%%%%%%%%%ooO@@," << std::endl;
std::cout << "||.%% `>%%%%%%%%%ooO%%%" << std::endl;
std::cout << "||' `%%%%%" << std::endl;
std::cout << "|| `%%'" << std::endl;
std::cout << "||" << std::endl;
std::cout << "||" << std::endl;
std::cout << "||" << std::endl;
std::cout << "||" << std::endl;
std::cout << "||" << std::endl;
std::cout << "||" << std::endl;
std::cout << "||" << std::endl;
std::cout << "||" << std::endl;
std::cout << "||" << std::endl;
std::cout << "||" << std::endl;
std::cout << "||" << std::endl;
std::cout << "--\n" << std::endl;
}
void PlayGame() {
const int CodeA = 4;
const int CodeB = 7;
const int CodeC = 12;
const int CodeSum = CodeA + CodeB + CodeC;
const int CodeProduct = CodeA * CodeB * CodeC;
std::cout << "+ There are three numbers in the code.";
std::cout << "\n+ The codes add-up to: " << CodeSum;
std::cout << "\n+ The codes multiply to give: " << CodeProduct << std::endl;
int GuessA, GuessB, GuessC;
std::cin >> GuessA >> GuessB >> GuessC;
int GuessSum = GuessA + GuessB + GuessC;
int GuessProduct = GuessA * GuessB * GuessC;
if (GuessSum == CodeSum && GuessProduct == CodeProduct) {
std::cout << "You win!\n";
}
else {
std::cout << "You lose!\n";
}
}
int main() {
PrintIntorodtion();
AsciiArt();
PlayGame();
return 0;
}
1 Like
Awesome art! I love the flag