3.5. SummaryΒΆ
Like Python C++ also supports the
if-elseconditional statements, and they behave the same way as they do in a Python program.Unlike Python, C++ does not support the use of the
elifstatement. However, you can get the functionality of anelifstatement by nestingifandelsestatements in C++.C++ also supports a
switchstatement that acts something like the elif statement of Python under certain conditions.C++ supports the use of Boolean expressions in
if-elsestatements.
You have attempted of activities on this page