3.4. SummaryΒΆ

  1. Like Python C++ also supports the if-else conditional statements, and they behave the same way as they do in a Python program.
  2. Unlike Python, C++ does not support the use of the elif statement. However, you can get the functionality of an elif statement by nesting if and else statements in C++.
  3. C++ also supports a switch statement that acts something like the elif statement of Python under certain conditions.
  4. C++ supports the use of Boolean expressions in if-else statements.
Next Section - 3.5. Glossary