//Basic if statement
//C++ general, Deathlycat
if ( TRUE ) {
// Execute these statements if TRUE
}
else {
// Execute these statements if FALSE
}
Now to implement it...
//Basic if statement
//C++ general, Deathlycat
if (x = 0) {
cout << "You loose!n";
}
else {
cout << "Hahaha...Wait, you won?n";
}
Outputs:
"You loose!" If you have 0 health.
Outputs:
"Hahaha...Wait, you won?" If you have at least 1 point oh health.