course content

Course Content

Introduction to C++

Logical OperatorsLogical Operators

You must use the logical operators NOT, AND, OR (!, &&, ||) to test several conditions simultaneously.

For example, we use logical operators from real life.

  • 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.
cpp

main.cpp

question-icon

What will the program output?

Select the correct answer

Section 3.

Chapter 3