Conditional Statements (if, else)
What is a Conditional Statement?
Conditional statements are used to make decisions in a program based on conditions.
google.com, pub-8434817042454839, DIRECT, f08c47fec0942fa0
Types of Conditions
- if
- if-else
- else-if ladder
Example
int age = 18;
if(age >= 18) {
cout << “You can vote”;
} else {
cout << “You cannot vote”;
}
Use Case
Used when your program needs to take decisions

