This piece of code:
if (milliongame == 'y')
{goto mill;}
else
return 0;
mill:
cout << "million level!" << endl;
you can replace with simpler:
if (milliongame != 'y')
return 0;
cout << "million level!" << endl;
This:
if (foo == 20)
foo = 25;
if (foo == 200)
foo = 250;
if (foo == 2000)
foo = 2500;
with this:
switch ( foo )
{
case 20:
foo = 25;
break;
case 200:
foo = 250;
break;
case 2000:
foo = 2500;
break;
}
And this:
if (x > PlayerNumber)
cout << "Your number was lower than the computers." << endl;
if (x < PlayerNumber)
cout << "Your number was higher than the computers" << endl;
if (x == PlayerNumber )
{cout << "You Won! \n\nThe computer's number was "<< x << endl; win=true;}
with:
if (x > PlayerNumber)
cout << "Your number was lower than the computers." << endl;
else if (x < PlayerNumber)
cout << "Your number was higher than the computers" << endl;
else
{
cout << "You Won! \n\nThe computer's number was "<< x << endl;
win=true;
}
Moreover, the last piece of code appears twice in you program, so you may create a function
void result(int PlayerNumber, int x)
{
if (x > PlayerNumber)
cout << "Your number was lower than the computers." << endl;
else if (x < PlayerNumber)
cout << "Your number was higher than the computers" << endl;
else
{
cout << "You Won! \n\nThe computer's number was "<< x << endl;
win=true;
}
}
and call it
result(PlayerNumber,x);
where this code should be.