vivosmith 27 Newbie Poster
#include <cstdlib>
#include <iostream>

using namespace std;

int main()
{
    const int Left=1;
    const int Right=2;
    
    int choice;
    cout << "Hello, choose a number.\n";
    cin >> choice ;
    if (Left==choice )
    {
    cout <<" Congrats!\n";
}
    else
{
    cout << "I lost the game.\n";
    return EXIT_SUCCESS;
}

// I remeber why I did not compare it to anything. I was trying to fix the code, but it was doing the same thing as it is now. And the only thing it will show is "hello, please choose a number". But when I go to enter a number, then press enter, the box closes. The reason I am trying dos is because I tried windows version, but it just closed on me.

Thank you

Fbody commented: You're a dense one... +0