My magic TripleX game ep 2

#include <iostream>

int main()
{
    //Print welcome messages
    std::cout << "You are a sorcerer on a quest to find the INCL staff...";
    std::cout << std::endl;
    std::cout << "You need to construct the better magic circles to defeat your enemies to continue..." << std::endl;;
    //Declaration
    const int CodeA = 4;
    const int CodeB = 3;
    const int CodeC= 9;
    //Matematic operations
    const int CodeSum= CodeA + CodeB + CodeC;
    const int CodeProduct= CodeA * CodeB * CodeC;
    //Print results  
    std::cout << std::endl;
    std::cout << "+ There are 3 numbers in the magic circle to defeat your enemy" << std::endl;
    std::cout << "+ The magic circle numbers add-up to: " << CodeSum << std::endl;
    std::cout << "+ The magic numbers multiply to give: "<< CodeProduct << std::endl;

    int GuessA, GuessB, GuessC;

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

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

    if(GuessSum == CodeSum && GuessProduct == CodeProduct)
    {
        std::cout << "You defeated your enemy";
    }
    else
    {
        std::cout << "Your magic circle wasn't the right one and your enemy has defeated you "
    }

    return 0;
}

Privacy & Terms