Are you the chosen one? (ASCII art included)

#include <iostream>

void AreYouTheChosenOne()
{
    std::cout << std::endl;
    std::cout << "                     .ed**** ***$$$$be.                    \n" ;       
    std::cout << "                   -*           ^****$$$e.                 \n" ;
    std::cout << "                .*                   *$$$c                 \n" ;
    std::cout << "                /                      *4$$b               \n" ;
    std::cout << "               d  3                      $$$$              \n" ;
    std::cout << "               $  *                   .$$$$$$              \n" ;
    std::cout << "              .$  ^c           $$$$$e$$$$$$$$.             \n" ; 
    std::cout << "             d$L  4.         4$$$$$$$$$$$$$$b              \n" ;
    std::cout << "              $$$$b ^ceeeee.  4$$ECL.F*$$$$$$$             \n" ;
    std::cout << "  e$**=.      $$$$P d$$$$F $ $$$$$$$$$- $$$$$$             \n" ;
    std::cout << " z$$b. ^c     3$$$F *$$$$b   $*$$$$$$$  $$$$**      .=**$c \n" ;
    std::cout << "4$$$$L        $$P*  *$$b   .$ $$$$$...e$$        .=  e$$$. \n" ; 
    std::cout << "^*$$$$$c  %..   *c    ..    $$ 3$$$$$$$$$$eF     zP  d$$$$$\n" ;
    std::cout << "  ***$$$ec   *   |ce**    $$$  $$$$$$$$$$*    .r* =$$$$P** \n" ;
    std::cout << "        **$b.  *c  *$e.    *** d$$$$$*L$$    .d*  e$$****  \n" ;
    std::cout << "          ^*$$c ^$c $$$      4J$$$$$% $$$ .e**.eeP*        \n";
    std::cout << "             *$$$$$$*'$=e....$*$$**$cz$$* *..d$**          \n";
    std::cout << "               **$$$  *=%4.$ L L$ P3$$$F $$$P*             \n";
    std::cout << "                  *$   *||ebJLzb$e$$$$$b $P*               \n";
    std::cout << "                    %..      4$$$$$$$$$$ *                 \n";
    std::cout << "                     $$$e   z$$$$$$$$$$%                   \n";
    std::cout << "                      **$c  *$$$$$$$P*                     \n";
    std::cout << "                       .****$$$$$$$$bc                     \n";
    std::cout << "                    .-*    .$***$$$****e.                  \n";
    std::cout << "                 .-*    .e$*     **$c  ^*b.                \n";
    std::cout << "          .=*****    .e$**          **bc  **$e..           \n";
    std::cout << "        .$*        .z**               ^*$e.   ******e.     \n";
    std::cout << "        $$ee$c   .d*                     **$.        3.    \n";
    std::cout << "        ^*$E*)$..$*                         *   .ee==d%    \n";
    std::cout << "           $.d$$$*                           *  J$$$e*     \n";
    std::cout << "            *****                              *$$$*       \n";



    
}

void PlayIntroduction()
{
    AreYouTheChosenOne();
    std::cout << "Are you the chosen one...\n"; 
    std::cout << "Solve the following puzzle to prove you are the chosen on...\n\n " ;

}

void PlayGame()
{
    
    PlayIntroduction();
    const int CodeA = 5; 
    const int CodeB = 2;
    const int CodeC = 4;

    const int CodeSum = CodeA + CodeB + CodeC; 

    const int CodeProduct = CodeA * CodeB * CodeC; 

    std::cout << std::endl;
    std::cout <<"Your clues are...\n" ;
    std::cout << "The numbers add-up to..." << CodeSum << std::endl ; // print sum
    std::cout << "The numbers multiply to give..." << CodeProduct << std::endl ; // print product

    int GuessA, GuessB, GuessC;
    
    int GuessSum, GuessProduct;

    std::cin >> GuessA >> GuessB >> GuessC ;
    

    GuessSum = GuessA + GuessB + GuessC;
    GuessProduct = GuessA * GuessB * GuessC;

    if (GuessSum == CodeSum && GuessProduct == CodeProduct)
    {
        std::cout <<"You are the chosen one.";
    }
    else
    {
        std::cout <<"You are not the chosen one. You shall perish now. ";
        

    }
    


}





int main()
{
    PlayGame();
    return 0;
}

   

3 Likes

Maybe :sunglasses:

Privacy & Terms