
Hochiminh City University of Technology
Computer Science and Engineering
[CO1027] - Fundamentals of C++ Programming
Control Flow - If Lecturer: Duc Dung Nguyen
Credits: 3

Outcomes
❖Understand basic control structures in C/C++
❖if-else statement
❖switch statement
❖Solve the problem using conditional executions
❖Implement if-else, switch-case statements
2

Today’s outline
❖Relational and logical operators
❖if-else statement
❖Nested conditionals
❖switch statement
❖Enum type
3

Relational and logical operators

Relational operators
5
Operator Meaning
“==" Equal to
“<" Less than
“>" Greater than
“<=" Less than or equal to
“>=" Greater than or equal to
“!=” Not equal to

