if and else statements allow decision-making in programs.
if
else
int age = 18; if (age >= 18) { cout << "You are an adult."; } else { cout << "You are a minor."; }
You can also use else if to check multiple conditions.
else if