#include <iostream>
usingnamespace std;
int main()
{
cout << "You Have 3 Guesses to guess the right number\nGuess The Number";
int x;
cin >>x;
if(x > 5)
cout << "The Number is Too Damn High!";
bool nNumber = false;
if(x < 5)
{
cout << "The Number is Too Damn Low!";
nNumber = false;
}
if(x == 5)
{
cout << "The Number is Just Perfect!";
nNumber = true;
}
if(nNumber == true)
cout << "You Won the Game!";
if(nNumber == false)
{
cout << "\nGuess Again!";
cin >>x;
if(x > 5)
cout << "The Number is Too Damn High!";
nNumber = false;
}
if(x < 5)
{
cout << "The Number is Too damn Low!";
nNumber = false;
}
if (x == 5)
{
cout << "The Number is Just Perfect!";
nNumber = true;
}
if(nNumber == true)
cout << "You Won the Game!";
if(nNumber == false)
{
cout << "\nGuess Again!";
cin >>x;
}
if(x > 5)
{
cout << "The Number is Too Damn High!";
nNumber = false;
}
if(x < 5)
{
cout << "The Number is Too damn Low!";
nNumber = false;
}
if(x == 5)
cout << "The Number is Just Perfect!\nYou Won the Game!";
if(x != 5)
cout << "\nYou Suck!\nI'll Never Tell You The Number!" << endl;
}
(I know its overly redundant,and i could make it shorter with loops & such, but i have a lot of time)
I just would like to know how I could make the equivelent of a .exe, but that would work on my mac,and something that would work on windows.