Conteúdo do Curso
C++ Introduction
4. Introduction to Program Flow
5. Introduction to Functions
C++ Introduction
Logical Operators
You have to use the logical operators NOT (!
), AND (&&
), and OR (||
) to evaluate multiple conditions concurrently. Let's illustrate using logical operators in real-life scenarios:
- I will take my wallet for a walk if there is a bank AND a shop on the way;
- I won't take my wallet for a walk if there is NOT bank on the way;
- I will take my wallet for a walk if there is a bank OR a shop on the way.
main.cpp
Tudo estava claro?
Seção 3. Capítulo 3
Conteúdo do Curso
C++ Introduction
4. Introduction to Program Flow
5. Introduction to Functions
C++ Introduction
Logical Operators
You have to use the logical operators NOT (!
), AND (&&
), and OR (||
) to evaluate multiple conditions concurrently. Let's illustrate using logical operators in real-life scenarios:
- I will take my wallet for a walk if there is a bank AND a shop on the way;
- I won't take my wallet for a walk if there is NOT bank on the way;
- I will take my wallet for a walk if there is a bank OR a shop on the way.
main.cpp
Tudo estava claro?
Seção 3. Capítulo 3