Tygawr -12

Oops, made a tiny error.. fixed:
[CODE]
int i = -1;

bool IsPositive()
{
if(i > 0)
return true;
else if(i < 0)
return false;
}

void Example()
{
switch(IsPositive())
{
case true:
cout << "+" << endl;
break;
case false:
cout << "-" << endl;
break;
default:
cout << "Zero/Unknown?" << endl;
break;
}
}
[/CODE]

Tygawr -12

This isn't rocket science guys...

[CODE]
int i = -1;

bool IsPositive()
{
if(i > 0)
return true;
else if(i < 0)
return false;
}

void Example()
{
switch(IsPositive())
{
case true:
cout << "+" << endl;
break;
case false:
cout << "-" << endl;
break;
case default:
cout << "Zero/Unknown?" << endl;
break;
}
}
[/CODE]

WaltP commented: And yet again you do someone's homework for them. You just don't get it, do you... -4

Tygawr -12

[CODE]
void IfElseLoopExample()
{
int Month;
cout << "Please enter a numerical value of a month: " << endl;
cin >> Month;

if(Month <= 12)
{
    cout << "A valid month has been entered." << endl;
}
else if(Month > 12 || Month < 0)
{
    cout << "That is not a valid entry. Please enter a new value." << endl;
    cin >> Month;
}

}
[/CODE]

Ancient Dragon commented: Doesn't answer the question -4